What is the purpose of Django's Q object?
- A To build complex queries with OR and NOT logic
- B To cache query results
- C To define model constraints
- D To serialise querysets
Answer
To build complex queries with OR and NOT logic
Chained filter() calls are combined with AND. Q objects allow OR conditions and negation within a single query.





