django - Reversing a ManyToMany relationship -


There are my boys and toys. Two two-deggengo model toys can be owned by more than one boy and each boy has more than one Can be the owner of the toys ... so I have kept many management fields in Boy.

If I want a list of toys alone, boy, this is easy. Yet all right

But now I need to get a list of boys based on a toy example. Relationships should be symmetric but I do not know the syntax.


Note: No, these are not my actual unit names - I thought it might be easy to follow.

It should be:

Toy_instance.boy_set.all ( )

Check here:


Comments