Check request.user.is_superuser. If it return True, the role of the user
signed in is Admin.
Saygılarımla,
Sencer HAMARAT
On Fri, Nov 29, 2019 at 3:41 PM Fruity Code wrote:
> I have an updated user model and added two fields to it, mobile_number and
> role. The field role has two options Cust
I have an updated user model and added two fields to it, mobile_number and
role. The field role has two options Customer and Admin. Currently, I have
made customer as the default value for role. Now what I want is when user
signup the role should be a customer but when an admin create a user fro
2 matches
Mail list logo