~/talk

The Design and Development of Choices in Django 3.0

Talkat DjangoCon Europe 2020 Β· 2020-09-18..09-19Β· [django, developer-experience]
links:none on file
slides:none on file

Django 3.0 adds a class-based choices API that packs constant names, values and labels together using enum base types so values compare to plain ints/strs; implementation uses a custom metaclass __new__ to strip labels from classdict, store them, and expose them via a value→label map and a per-member property. The design solves translatable labels, the empty choice via special name trick, and settles on str() returning the underlying value; the feature lands, a beta bug is fixed, and it ships.

AI-written summary Β· about

  1. 0:00Introduction to Choices feature
  2. 1:14Traditional choices in Django
  3. 2:18History of Django choices feature
  4. 4:50Proof of concept with enums
  5. 6:14Development and PR process
  6. 8:00Design issues encountered
  7. 13:45Empty choice and dunder str debates
  8. 14:27Implementation deep dive
  9. 20:35Meta class and dunder new
  10. 21:36Property decorator magic
  11. 23:46Future of choices in Django
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← β†’
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.