Multiple Profiles in Django 1.11

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multiple Profiles in Django 1.11

Bujj
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

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3e9c485d-3656-4720-927d-108b20b98759%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple Profiles in Django 1.11

Camilo Torres
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:
  • https://docs.djangoproject.com/en/1.11/topics/auth/
  • https://docs.djangoproject.com/en/1.11/topics/auth/default/

Hope this helps.


On Tuesday, April 18, 2017 at 9:14:39 AM UTC-4, Bujj wrote:
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

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9268f190-33f6-449b-93ae-95b3504fc7ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...