Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to fetch reverse foreign key on model object django

You can use events = venue.event_set to go the other way.

Note that venue.event_set is a manager object, like Event.objects, so you can call .all, .filter, .exclude and similar on it to get a queryset.
 
PREVIOUS NEXT
Tagged: #fetch #reverse #foreign #key #model #object #django
ADD COMMENT
Topic
Name
8+1 =