سؤال

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.

هل كانت مفيدة؟

المحلول

from django.contrib.auth.models import User
User.objects.all()
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top