because you have provided the get_department with index 0. so it will only
give you the info about first department.

On Tue, Jul 27, 2021 at 3:17 AM sum abiut <suab...@gmail.com> wrote:

> I am trying to get the values of the userid by iterating through the
> queryset. However not all the values are displayed. I am not sure why I am
> not getting all the values when I iterate through it.
>
> users - Users.objects.filter(depid=get_department[0].depid)
> print(users) #when i test it here it pring all the values
> #however it only prints one value when i loop through it below. i want to
> be able to print all the #values
> for a in users:
>   print(a)# this only print value for the first user
>
> --
> 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/CAPCf-y65WJVjZC2PA4tz3ZubOtP5CjLtdHegiThhRnK8W5hSiw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPCf-y65WJVjZC2PA4tz3ZubOtP5CjLtdHegiThhRnK8W5hSiw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAKPY9pkp-vCz8%2BfJoGRkjfL-ohECO%2Bq1nH9mfZ3o-isYB3NUXg%40mail.gmail.com.

Reply via email to