Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
“Forms are static” – “No, they aren't”
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Markus H
June 02, 2015
Technology
10k
1
Share
“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
27
🐍 ❤️ 🦀 — Python loves Rust
markush
0
290
Knock! Knock! Who's There?
markush
0
95
An Introduction To Kubernetes ☸
markush
0
140
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
77
Logging Rethought 2: The Actions of Frank Taylor Jr. (PyCon Australia 2019)
markush
1
230
Other Decks in Technology
See All in Technology
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
350
Cloud Run のアップデート 触ってみる&紹介
gre212
0
240
イベントで大活躍する電子ペーパー名札 〜その3〜 / ビジュアルプログラミングIoTLT vol.23
you
PRO
0
160
AIが変えた"品質の守り方"
kkakizaki
13
5.4k
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
1k
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
290
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
190
Kaggle未経験社員をメダリストに育てる「AIドラゴン桜」
lycorptech_jp
PRO
0
660
海外カンファレンス「JavaOne」参加レポート ユーザー系IT企業における目的・成果/JavaOne Report Purpose and Results in the User IT Company
muit
0
110
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
7
960
もりもり新機能を一挙紹介! AgentCoreに入門して、AWS上にAIエージェントを構築しよう
minorun365
PRO
4
170
Datadog 認定試験の概要と対策
uechishingo
0
200
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
Building the Perfect Custom Keyboard
takai
2
780
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Building Applications with DynamoDB
mza
96
7.1k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
290
Designing for Performance
lara
611
70k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
270
Done Done
chrislema
186
16k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
380
Color Theory Basics | Prateek | Gurzu
gurzu
0
320
Testing 201, or: Great Expectations
jmmastey
46
8.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.8k
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