How to login different user each on different pages using class based views
86 views
Skip to first unread message
JJEMBA KENNETH
unread,
Feb 14, 2017, 6:00:54 AM2/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hello guys,
I started using django a month back and I have been using class based views. they are pretty good. Then am wondering how i can use them to implement different categories of user where each is redirected to a different page.
Can anyone please help me with that.
--
Jjemba Kenneth
ludovic coues
unread,
Feb 14, 2017, 8:24:10 AM2/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
I would add a get_redirect_url method on all user model, which give a
different url depending on the user category.
Then use a redirect url with a get_redirect_url method returning the
value of get_redirect_url from the user.
If you want to use url name instead of path, use django.urls.reverse