#36955 new New feature

Add strict template variable support with global and per-variable configuration

Reported by: Kiran Owned by:
Component: Template system Version: 6.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top