Yeah, this is built in to django. You are on the right track with user.contrib.auth. If you are doing this all from the admin then it's as simple as creating a few groups, giving them the permisions you want and then assigning users to those groups.
If you are doing it on a front facing site, then there are many template tags and view for checking permissions. I hate to just point you at the documentation but it's pretty thorough in this topic and without specific examples it would be difficult to work through any examples. http://docs.djangoproject.com/en/1.1/topics/auth/ On May 10, 6:18 am, signallock <[email protected]> wrote: > Hi all, I'm a Python n00b but find Django very useful for me. However, > there is a problem in my recent project which needs several user > roles. For example, the 'user' role can browse some information and > submit some register forms, the 'admin' role can view and verify these > forms and/or modify them, the 'manager' role can add or delete 'admin' > users. All users need to login in order to specify their roles. I've > read some documentations about django.contrib.auth and django- > authorization all day but still confused... Is there any way to > implement this? Or, can django.contrib.auth do this? I really want to > use decorations in views.py to authenticate different types of users > or verify different permissions of users if it is possible. > I'm sorry to post this low-level thread but I've really read the > documentation first. Maybe there aren't many examples, or maybe I feel > a little bit hard to understand English :-[ > Thank you! > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

