My First Contribution to Django
March 2026
Introduction
I recently started exploring Django internals to understand how its template system works.
While working with templates, I noticed that Django silently ignores missing variables and renders them as empty strings.
This made me think:
What if developers want stricter behavior during development?
The Idea
I came up with an idea to introduce a strict mode for template variables.
- Raise an error when a variable is missing
- Keep it optional (so existing apps don’t break)
- Improve debugging for developers
What I Did
To explore this idea, I:
- Forked the Django repository
- Created a new branch
- Implemented initial changes
- Opened a Pull Request
This was my first time contributing to a large open-source project.
Challenges I Faced
- CI (Jenkins) tests were failing
- Database errors (PostgreSQL not running)
- Understanding Django’s testing system
At first, it was confusing, but I learned how large projects manage testing and environments.
What Happened Next
After opening the PR:
- Maintainers reviewed it
- They suggested creating a Trac ticket
- Discussion moved to Django’s new-features repo
Instead of merging directly, it became a design discussion.
Community Feedback
- Global strict mode may break existing templates
- Some templates rely on missing variables
- Per-template approach might be better
- Real-world testing is important
What I Learned
- Open source is not just coding
- Backward compatibility is important
- Small changes can affect big systems
- Feedback is very valuable
- Patience is key
Current Status
The feature is under discussion. I am exploring:
- Global settings
- Per-template configuration
Conclusion
This was my first real contribution to Django and a great learning experience.
I’m excited to continue contributing to open source.
👉 View my PR:
Click here