Re: Auto assigning 2 types of user roles on sign up

2019-10-23 Thread Nazish Akhtar
Initially you will have to create Role object and then assign it to user. and you add new roles whenever you want by editing Role model On Wednesday, 23 October 2019 21:44:10 UTC+5:30, Stephanie Semerville wrote: > > When you say: "create an instance and save it to db later", is that > dynamic?

Re: Auto assigning 2 types of user roles on sign up

2019-10-23 Thread Stephanie Semerville
Understood but what is the snippet o code that specifies the role that i would like to assign to invited user? On Wednesday, October 23, 2019 at 12:43:44 PM UTC-4, Jani Tiainen wrote: > > Hi. > > Personally I would do it as follows: > > On invitation create invited user account at least with

Re: Auto assigning 2 types of user roles on sign up

2019-10-23 Thread Jani Tiainen
Hi. Personally I would do it as follows: On invitation create invited user account at least with email and with member role. Make account disabled. You might also add invitation key which you can put in email and check as well. When invited user starts sign up procedure you can just fill in the

Re: Auto assigning 2 types of user roles on sign up

2019-10-23 Thread Stephanie Semerville
When you say: "create an instance and save it to db later", is that dynamic? On Tuesday, October 22, 2019 at 11:26:19 PM UTC-4, WD Wang wrote: > > hi, > > A user could have many roles, it's all depends on your design. My > understanding is: > 1. When user directly sign up, he will be assigned

Re: Auto assigning 2 types of user roles on sign up

2019-10-23 Thread Nazish Akhtar
Hey. I am working project where I need it. Five different roles, but users can have Multiple roles. Here is link to my git repo https://github.com/noobExtendsBot/django-custom-user form out side it in not documented enough (actually haven't commit on github) but you have a look inside models

Re: Auto assigning 2 types of user roles on sign up

2019-10-22 Thread wd
hi, A user could have many roles, it's all depends on your design. My understanding is: 1. When user directly sign up, he will be assigned the primary role. 2. When user sign up by an invitation, he will be assigned the member role. 3. So can a user in member role invite other users? The

Auto assigning 2 types of user roles on sign up

2019-10-22 Thread Stephanie Semerville
I am new to Django and trying to create a website that has two user roles primary and member. What i would like to happen is for by default a primary user to sign up and be assigned the primary role. When that primary user logs into the website, I would like them to have the ability to invite