I am using django-auth , thus all the usernames are stored there . How do I retrieve all these users in a different app , to apply certain privileges to it ? Like databrowse admin , is there any way to browse the users (usernames) too ?
Share
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.
If you don’t know how to do a query in Django, you shouldn’t be trying to get django-auth working, or trying to change privileges or use the admin. Walk before you can run.
If you had a model (i.e. a table in the database) representing People:
how would you go about getting all of the people in your database? You’d use:
to get a person with a particular name? Try:
so on. It’s the same for django-auth’s users.
Forget about applying privileges to anything. Concentrate on learning the absolute basics of Django, Querying and the ORM before you do anything else.
http://www.djangobook.com/en/2.0/