[英]Viewing auth_user model in Django
How do I view the contents of the auth_user model in Django? 如何在Django中查看auth_user模型的内容?
For example, I have created a model Class called EmailList within my app. 例如,我在我的应用程序中创建了一个名为EmailList的模型类。 And to view the email QuerySet I can do:
要查看我可以执行的电子邮件QuerySet:
>>> 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.? 我如何使用
auth_user
模型执行相同的auth_user
,以便查看用户的电子邮件,姓名等? Thank you. 谢谢。
from django.contrib.auth.models import User
User.objects.all()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.