So I have my models
Class Category((models.Model)
category = models.CharField()
class Group(models.Model)
Title = models.CharField()
category = models.ManyToManyField(Category, related_name= tags)
So I want to be able to filter all the groups with similar tags to the group currently in view
In my views.py I tried
group = Group.objects.get(id=pk)
groups = Group.objects.filter(category=group.category)
But that doesn't work