~/talk

Custom Model Managers and QuerySets: Graduating from Django Beginner to ORM Master

Talkat DjangoCon US 2023 · 2023-10-16..10-20· [databases]
slides:none on file

Migrates an old ColdFusion lease app that handles roughly 800 clubs and 1,200 tracks to a Django backend with Django REST Framework and shows that custom model managers and querysets let complex SQL become readable, testable ORM methods. Demonstrates when manager methods must be nonchainable versus chainable querysets, patterns like create-with-side-effects, date range filters, set/toggle field updates, and heavy use of annotations and subqueries so raw SQL is rarely needed and the rewritten system works and is maintainable.

AI-written summary · about

  1. 0:00Introduction
  2. 2:30Django model managers
  3. 4:18Custom managers and QuerySets
  4. 6:24Why custom managers matter
  5. 9:13Real-world use case
  6. 12:03Common manager patterns
  7. 18:05Summary
~/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.