[Answer]-How to make filter query in Django?

1👍

Have a look at the filter documentation.

To get a group of subcategories whose category field is populated by the category my_cat, you would do –

sub_cats = SubCategory.objects.filter(category=my_cat)

Leave a comment