~/talk

Mighty Model Managers

Talkat DjangoCon US 2016 · 2016-07-17..07-22· [django]
links:none on file
slides:none on file

Model managers are presented as the concrete way to manage query logic: renaming defaults for readability (person.people.all), moving repeated filters into managers and QuerySet methods, and using QuerySet.as_manager (Django 1.7) to expose chainable operations like authors/editors and full-time/part-time. A soft‑delete pattern via an is_active field hides inactive rows by default, improving safety in a healthcare app where it ships and runs. Result: fewer duplicated queries, simpler tests, and composable caching and logging hooks.

AI-written summary · about

  1. 0:00Introduction
  2. 0:45Why are we here
  3. 1:46Why talk about model managers
  4. 2:34Show of hands
  5. 3:24Job of a Manager
  6. 4:07Sample Project
  7. 4:24No Big Deal
  8. 4:47Semantics
  9. 5:20Readability
  10. 5:38People
  11. 6:05Business Logic
  12. 7:12Subclass Manager
  13. 7:25Reference Manager
  14. 7:50Author Manager
  15. 8:09Query
  16. 9:25Model
  17. 10:09Employee Type
  18. 10:25FullTime PartTime
  19. 11:04PartTime Authors
  20. 12:00Preventing Mistakes
  21. 13:24Using Encapsulation
  22. 14:33One Caveat
  23. 16:27Query Sets
  24. 17:03Shoutouts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.