i have a django project that has 2 types of users ( teachers and students in my case )
i want each group of them to view a different page when they login.
how is that possible ?
or how to know what group a certain user belong to ?
thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To get the groups of a user check the docs on authentication.
So if you want to check if a user is member of the group teachers:
Considering the redirection see this answer: Django – after login, redirect user to his custom page –> mysite.com/username