I have two Registration pages: Register as Buyer, Register as Seller.
on both Pages , I've included Normal Registration and social authentication using Google and Facebook.
I've added social authentication using Django all-auth, but cannot get user_role.
[1][Registration Page]:
- after Registration : user is redirected to home page and as there is no user_role set in social authentication , one cannot access Buyer or Seller 's section.
[2][Signup with Google]: After signup : User is registered as Blank Login.
- check home page after Google signup:
MY TASK : Is to assign user_type on both the buttons: Buyer and Seller. on click button redirect user to its particular Registration Page and Login/Signup with Social Authentication and after Successful-Login Redirect User to its Page and show user_type in Django-administration-panel as:
User_type | Email | is_active
Buyer | [email protected] | True
Seller | [email protected] | False
You can create a profile model for all users and then give the user a profile like this.
#models.py
this will run after the user has created.
#signals.py
edit: I don't know how is your user_type field I assume it is "user_type"