Django Get All Users

前端 未结 4 681
执念已碎
执念已碎 2020-12-24 01:08

I am just starting out with Django and I am messing around just trying to pull a full list of users from postgres.

I used the following code:

group =         


        
4条回答
  •  眼角桃花
    2020-12-24 01:47

    Django get user it's also simple method to get all user ,create user ,change password ,etc

    from django.contrib.auth import get_user_model
    user = get_user_model()
    user.objects.all()
    

提交回复
热议问题