开发者

Two sets of users (teacher and student) in Django authentication

I'm building a web application where I have 2 sets of users (students and teachers). Teachers should be able to create their account, create a page of their content. Students should be able to create an account to sign up for this content. I am currently using django-registration to handle registration but I am wondering what's the best way to handle these 2 sets of users and still be able to use the Django authen开发者_运维技巧tication framework? I have heard about having multiple profiles but would like some opinions.

Thanks!


You could use permissions. When they sign up if they're a Teacher give them content creation permissions. If they're a student they don't get the permissions.

In the user profile I would just have a field that says which type they are. Unless a lot of the data is different I wouldn't have two user profiles.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜