django group authentication

21 views
Skip to first unread message

sum abiut

unread,
Sep 19, 2016, 7:37:07 PM9/19/16
to django...@googlegroups.com
Hi,
i am building an app using django, on login i want django to check for users in a group before login users.
 For example, i want to redirect users from a group to page when they login.

please advise the best way to approached this.

cheers

Andreas Kuhne

unread,
Sep 20, 2016, 3:25:54 AM9/20/16
to django...@googlegroups.com

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
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/CAPCf-y66dg4Yo0jmuQZjvFz0m20O4RB%3DG_fNmyKdoaTYeyOv%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi,

All you have to do is to hook into the login function. See the documentation here: https://docs.djangoproject.com/en/1.10/topics/auth/default/#how-to-log-a-user-in. You can also rewrite the login function to do as you please (we have done that on a project), however this means that you have to update that function every time you update django.

Regards,

Andréas
Reply all
Reply to author
Forward
0 new messages