Introduction
Q objects help you build complex database queries easily. They let you combine conditions with AND, OR, and NOT in a clear way.
When you want to filter database records with multiple conditions combined with OR.
When you need to negate a condition in a query.
When you want to mix AND and OR conditions in a single query.
When simple filter() calls are not enough to express your query logic.