Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
“Forms are static” – “No, they aren't”
Search
Markus H
June 02, 2015
Technology
10k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
“Forms are static” – “No, they aren't”
My talk from DjangoCon Europe 2015 in Cardiff, Wales
Markus H
June 02, 2015
More Decks by Markus H
See All by Markus H
Oh, I Found a Security Issue (reloaded 2026)
markush
0
42
🐍 ❤️ 🦀 — Python loves Rust
markush
0
300
Knock! Knock! Who's There?
markush
0
110
An Introduction To Kubernetes ☸
markush
0
150
Writing Safe Database Migrations (DjangoCon Europe 2021)
markush
0
14k
A Pony On The Move: How Migrations Work In Django 🐎
markush
0
13k
All Hands on Deck — Handling Security Issues
markush
0
14k
Logging Rethought 2: The Actions of Frank Taylor Jr. (PyCon UK 2019)
markush
0
89
Logging Rethought 2: The Actions of Frank Taylor Jr. (PyCon Australia 2019)
markush
1
250
Other Decks in Technology
See All in Technology
あるけみー式LTスライド作成術
alchemy1115
1
180
NW運用でNWトポロジ可視化ツールに期待すること/shumoku-meetup1
corestate55
2
110
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
2
140
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
630
20260912_スクラムにジェネラリストは必要か
ryugen04
0
360
「図書館」という名前のままでいいのか -Code4Lib JAPANカンファレンス2026 アンカンファレンス報告- / Code4Lib JAPAN Conference 2026: Unconference Report
ykiyota
0
170
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
340
AIオーケストレーションを活用した 開発ワークフローの設計と実践
bqnq
0
140
[2026-09-11]SREは誰のもの?運用エンジニアが始める 「SRE領域への越境」とチームの進化の軌跡 〜Road to NEXT CRE
tosite
0
160
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
1
500
「重なり」は迎える側がつくる ― 人もAIエージェントも歓迎するプロダクトエンジニアリング ―
go0517go
PRO
0
280
目の前の楽しいが人生を変える - コミュニティの螺旋の歩き方と楽しむコツ / change your life
soudai
PRO
4
480
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
550
Visualization
eitanlees
152
17k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
GraphQLとの向き合い方2022年版
quramy
50
15k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
680
The Cult of Friendly URLs
andyhume
79
7k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
470
A designer walks into a library…
pauljervisheath
211
25k
GitHub's CSS Performance
jonrohan
1033
470k
Transcript
“Forms are static” – “No, they aren't”
Hi, I’m Markus Holtermann • Django Core Developer • CS
MSc Student @m_holtermann • github.com/MarkusH • markusholtermann.eu
Forms are static
What does “static” even mean?
What about request dependent forms?
They are static too!
What are non-static forms then?
Why do you need them?
How does that work?
def modelform_factory(model, …): attrs = { ‘fields’: fields_for_model(model), ‘model’: model,
} Meta = type(str('Meta'), (object,), attrs) class_attrs = {‘Meta’: Meta} class_name = model.__name__ + str('Form') return type( class_name, ModelForm, class_attrs )
Wait! Aren’t they still static?
type(name, bases, attrs) rocks!
django-dynamic-forms http://django-dynamic-forms.rtfd.org
Actions FormModel Name URLs Name FormFieldModel Options Label … …
belongs to
@formmodel_action('Send to admins') def send_admins(form_model, form, request): # label →
value mapped_data = form.get_mapped_data() # construct message message = render_to_string( 'dynamic_forms/email.txt', { 'form': form_model, 'data': mapped_data}) # send data via mail mail_admins( “New form submission”, message )
@dynamic_form_field class IntegerField(BaseDynamicFormField): cls = 'django.forms.EmailField' display_label = 'Email' class
Meta: # attribute = [type, default, class] max_value = [int, None, forms.IntegerField] min_value = [int, None, forms.IntegerField]
None
None
None
django-dynamic-forms http://django-dynamic-forms.rtfd.org
Thank You! @m_holtermann • github.com/MarkusH • markusholtermann.eu