Taming Your Templates: Component-Based Frontends in Django
summary
Argues that Django templates can be component-first without a heavy JS build pipeline, with concrete tooling and tradeoffs: django-includecontents adds props, slots and Jinja support so templates read like components and allow incremental adoption; alternatives include django-cotton, Slippers, Django View Component, Wagtail PyPI for per-page bundling, and HTMX/Alpine for selective interactivity. Notes performance: fastest templates are the flattest (many includes hurt server time and caching matters), and docs can live in a pattern library (YAML) + Playwright or accept that Storybook is awkward for Django templates unless you add scaffolding.
AI-written summary · about
chapters (13)
- 0:00Introduction and speaker intro
- 1:07Django templates evolution
- 4:54Tradeoffs in frontend tools
- 5:15Limitations of native Django includes
- 7:11Solving include pain points
- 8:17Component demo with include contents
- 12:54Alternative component packages
- 13:58Performance and caching
- 14:23Documentation with Django pattern library
- 17:50Wagtail PyPI for multi-backend use
- 18:59Storybook for component docs
- 20:53Framework alignment advice
- 21:34Q&A session
