Question

How do I view the contents of the auth_user model in Django?

For example, I have created a model Class called EmailList within my app. And to view the email QuerySet I can do:

>>> from app.models import EmailList
>>> EmailList.objects.all()

How would I do this same thing with the auth_user model, so I can view the users' emails, names, etc.? Thank you.

Was it helpful?

Solution

from django.contrib.auth.models import User
User.objects.all()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top