Q Object (Django)

A Q object lets you build complex database queries with OR, AND, and NOT logic in the Django ORM. Plain filter() arguments are always ANDed together, so you…