Issue
I need advice. I want make 3 types of user:
- member (only nickname/password/email)
- company (nickname/password/email/company/regon + permision for edit model)
- admin
My question is aobut how make model for this users:
- make big model for member and company together but field which are only for comapny make empty for member. Next to by admin panel i can make group and add "comapny" ppl
- make 2 type of user (here i will need advice like what i should use on it) and seperate website register for member and company and login should be the same form
Thank you for answer
Solution
You can achieve this simply by creating a Boolean field for each type of user (member, company, admin) in your User model. Save the different type of users from different URLs, when save just change the Boolean flag into True. Then, you can handle the user in view like if user_type.member: and so on. It also can be achieved by using Enum (choice) field.
Answered By - Y Logs
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.