Multiple Profiles in Django 1.11

30 views
Skip to first unread message

Bujj

unread,
Apr 18, 2017, 9:14:39 AM4/18/17
to Django users
Hi guys i am new to django and i need some help here, i have created two apps inside my django project namely students and teachers, how do i create an authentication system for each one of them?  where they can register and login to their backend, which will have a totaly different look from one another

Camilo Torres

unread,
Apr 18, 2017, 11:59:23 AM4/18/17
to Django users
Hi,

I think you can use the default authentication system and create 2 different groups: 'students' and 'teachers', give 'students' group permissions to all the parts of the application for students; similarly, give the 'teachers' group permissions to all the parts of the teachers application; you can do this with the admin. When you create new users, you should put them in any of the 2 groups; you can do this with the admin or programmatically.
Then, in your application views, remember to check for permissions by using the already available mixins or function decorators.
Please, read this part of the documentation:

Hope this helps.

Reply all
Reply to author
Forward
0 new messages