Hello djangoists.
How to I make the following possible?
models.py
class Article(models.Model):
#...
regions = models.ManyToManyField(Region)
elsewhere...
regions = Region.objects.all()
articles = Article.objects.filter(regions=regions)
Currently, the 'articles' retrieved are only from a match with the first region in the queryset, i.e. regions[0].
Of course I would like to get article matches from 1-n regions found.
Kind thanks.
Daryl.