class Q [source]
A Q() object, like an F object, encapsulates a SQL expression in a Python object that can be used in database-related operations.
In general, Q() objects make it possible to define and reuse conditions. This permits the construction of complex database queries using | (OR) and & (AND) operators; in particular, it is not otherwise possible to use OR in QuerySets.
Please login to continue.