~/talk

Good form: How Django’s form rendering improved during the 4.x series

Talkat DjangoCon Europe 2023 · on Wednesday, 2023-05-31· at 11:35· Music Hall· [django, web-platform]
linkedin:dmsmith
slides:none on file

Django 4.x switches form rendering to the template engine, adding as_div as an accessible default and a transitional renderer to preserve older table output; templates can be set per-project, per-form and per-instance via a custom form renderer or form.render(template=...), and the new use_fieldset and legend support let choice widgets render grouped inputs with proper fieldsets. Practical examples show how to move label/helptext logic onto fields, loop bound fields to reduce template repetition, and compare when third‑party tools like crispy‑forms (Python layouts, template packs, dynamic CSS classes) still add value. Also previews boundfield as_fieldGroup landing in Django 5.0.

AI-written summary · about

  1. 0:00Introduction
  2. 1:51Form anatomy basics
  3. 5:48Accessible form rendering
  4. 10:30Customizing form layout
  5. 14:27Reusable form templates
  6. 17:58Third-party libraries
  7. 22:34Future improvements
  8. 25:20Q&A
~/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.