[Django]-Get objects from a many to many field

62👍

You can use:

space.related.all()

to return a QuerySet of User

34👍

For Django >= 1.9

space.admins.all()

As mentioned by Salvatore Iovene

7👍

To get all many_to_many objects (not for specific space), for me works

Space.admins.through.objects.all()

(Django 2.14)

👤zushe

Leave a comment