Reputation: 109
I need to filter by a field one to many but I just want to show related objects and not all.
is this possible, or I have to create a custom filter?
Upvotes: 3
Views: 628
Reputation: 11
I try to keep my templates as "dumb" as possible, so I would definitely filter my data in the view. You could try something like this:
filtered_results = [ row for row in results if row['key'] == 'value' ]
Upvotes: 1