[Answer]-Checking for contains in many-to-may field when doing a query in Django

1👍

Easy, the Django ORM can handle many-to-many filters just the same.

So, I’m thinking something like this:

user_blogs = Blog.objects.filter(owner=user)

user_blogs_with_article = user_blogs.filter(articles=article)

Leave a comment