DjangoCon Europe 2023 | Good form: How Django’s form rendering improved during the 4.x series

  Рет қаралды 1,473

DjangoCon Europe

DjangoCon Europe

Күн бұрын

Good form: How Django’s form rendering improved during the 4.x series
by David Smith
If you render forms server side then this talk is for you! How to make best use of Django’s form rendering features introduced during the 4.x series to help you simplify your form logic.
Historically Django has used concatenation of strings to render its forms with various as_* methods to render forms in different styles. While great to get a project up and running many folk will have used a third party library to help ease customisation of forms.
During the 4.x series a number of changes have been made including a switch to use the template engine to render forms, the ways in which the template can be set has grown and a new default style will replace as_table from Django 5.0.
We’ll cover:
⁃ What is a form, a field and a widget? What common attributes can I set to avoid logic in my template?
⁃ The switch to template based rendering, and that a template can now be used to render your form. We’ll work through a concrete example how this can be used simplify logic in your templates.
⁃ How the rendering of your form can be set on a per-project, per-form and per-instance basis.
⁃ Introduction of a new as_div template style, and why the other styles are no longer recommended.
⁃ Future ideas on how Django can ease form rendering further.
⁃ So with all this change, do I still need 3rd-party package such as crispy-forms?
May your form be good!

Пікірлер
DjangoCon Europe 2023 | Yak-shaving to Where the Puck is Going to Be.
25:26
DjangoCon 2022 | Quality Assurance in Django - Testing what matters
28:40
DjangoCon Europe
Рет қаралды 2,5 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Build a Custom UI with Django | CRISPY FORMS | OFFICIAL TECH
1:01:02
Official Tech
Рет қаралды 7 М.
DjangoCon Europe 2023 | Do the holes in Swiss cheese leak abstractions?
35:12
Making A Billion-Year Lego Clock
13:11
Brick Technology
Рет қаралды 8 МЛН
DjangoCon US 2023: Don't Buy the "A.I." Hype
26:09
Tim Allen
Рет қаралды 16 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
Neo4j (Graph Database) Crash Course
1:23:08
Laith Academy
Рет қаралды 246 М.
DjangoCon 2019 - Frontend Development for Backend Developers
52:41
DjangoCon Europe
Рет қаралды 5 М.