2016-09-20 1:36 GMT+02:00 sum abiut <[email protected]>: > 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 > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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 > <https://groups.google.com/d/msgid/django-users/CAPCf-y66dg4Yo0jmuQZjvFz0m20O4RB%3DG_fNmyKdoaTYeyOv%2BQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > 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 -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CALXYUbmsV_aVeMqsQ5tjg%3D1xv7pudfeZvFG%3Dy%2Bx8f%2B6EwT-4UQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

