#36955: Add strict template variable support with global and per-variable
configuration
-----------------------+-------------------------------------------
Reporter: Kiran | Type: New feature
Status: new | Component: Template system
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------+-------------------------------------------
This proposal introduces optional strict handling for template variables.
Currently, Django silently renders missing variables as empty strings.
This feature would allow enabling a strict mode where undefined variables
raise an exception instead.
The proposal includes:
- A global strict template variable setting.
- Optional per-variable override behavior.
- Backward compatibility by keeping strict mode disabled by default.
Feedback is welcome before proceeding further.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36955>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.