I've got a model that has a list of tags.
class Document(models.Model):
docfile = models.FileField(upload_to='documents/%Y/%m/%d', max_length=150)
tags = models.ManyToManyField(Tag)
I want to be able to find all the Documents that are tagged with X and Y, but not exclusively X and Y. That is, I want documents that are tagged with X, Y, Z to show up when I search for X and Y.
The accepted answer from this question gets me pretty far, but it returns items that are tagged with those and only those tags. The annotation limits the query set.