User.objects.all() will return a queryset you can put it in a loop such as
users = User.objects.all() for user in users: user.first_name And also there are other ways to get dict instead of queryset object but its up to you. Sent from my iPhone > On 7 May 2020, at 2:46 PM, Mohsen Pahlevanzadeh <m.pahlevanza...@gmail.com> > wrote: > > User.objects.all() only returns one field, I need to others fields > such as first_name or last_name. > > How can I access others field? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAJFFGZ%2BG84ORqhqgCDDN8jTQdNSpt_XUZMLRaO9LXb%3D1fc158Q%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ACB66807-3F15-460E-9B0E-AB070F9189D2%40gmail.com.