GSoC 2026 Proposal Django Template Missing Variable Control

Hi everyone,

I am submitting a proposal for Google Summer of Code 2026 under Django and would appreciate feedback from the community.

Project Title: Django Template Missing Variable Control

Abstract:
This project aims to improve Django’s template system by providing developers with better control over how missing variables are handled. Currently, missing variables are silently rendered as empty strings, which can hide bugs and make debugging difficult.

Proposed Idea:
I propose introducing explicit handling for missing variables in templates:

  • Required variables that raise errors if missing
  • Optional variables that retain current behavior
  • A configurable strict mode for development environments

Example:
{{ username! }} → required variable
{{ username? }} → optional variable

Timeline:

  • Research and design: Weeks 1–3
  • Implementation: Weeks 4–9
  • Testing and refinement: Weeks 10–11
  • Documentation: Week 12

I would love to get feedback on:

  • Feasibility of this approach
  • Suggested improvements
  • Any existing related discussions I should consider

Thank you for your time!

1 Like