Django models fabulous four tools Q objects, F objects, annotate, and aggregate — the four tools that let you stop dropping to raw SQL, and the one distinction everyone gets wrong. The Django ORM Can Do Way More Than .filter() Django Development
Reverse Relationships in Django Guide Where that mysterious _set comes from, what related_name actually does, and how to query backwards across a ForeignKey. author.book_set: Reverse Relationships in Django, Finally Clear... Django Development
Django: Custom model managers and querysets Custom managers and querysets — how to name your query logic once, reuse it everywhere, and chain it like Django’s built-in methods. Stop Repeating .filter(is_active=True) Everywhere. Django Databases Development