[GSoC 2026] Native Component-Based Templates for Django

Hi everyone,

My name is Nureddin, a fresh graduate and junior software engineer working remotely for a US-based company. I’m applying for Google Summer of Code 2026 with Django and would love to get early feedback on my project idea before submitting the official proposal.


The Problem

Django’s template engine is powerful, but it lacks a native component model. Right now, developers who want encapsulated, reusable UI components have to choose between:

  • {% include %} which is limited, has no encapsulation, and no slot support
  • Third-party libraries like django-cotton, django-components, and django-partials, each with different APIs and trade-offs

The fact that so many third-party libraries exist solving the exact same problem is a strong signal that this belongs in Django core.


The Proposed Solution

Add a lightweight, native component system to Django’s template engine. The goal is not to replicate the full complexity of django-components, but to introduce a minimal, well-scoped primitive that covers the most common use cases:

  • A {% component %} tag (or similar syntax) for declaring and using reusable template components
  • Slot support for content injection (default slot and named slots)
  • Scoped context so components have their own isolated context by default, with explicit prop passing
  • No JavaScript dependency, pure server-side rendering, composable with HTMX or Alpine.js by choice

This would be implemented as an extension to Django’s existing template engine (django/template/), following the same patterns used by existing built-in tags.


Why Now?

  • django-cotton has demonstrated a clean, minimal API that the community has responded very positively to
  • The “missing template variables” idea already on the GSoC 2026 list shows the core team is open to template engine improvements
  • The component ecosystem has matured enough that we can now define clear, stable semantics for a core implementation
  • This is a pure Python/Django implementation with no new dependencies required

What Success Looks Like

By the end of GSoC, I aim to deliver:

  • A working implementation of the component tag and slot system in django/template/
  • Full test coverage following Django’s contribution standards
  • Documentation integrated into Django’s official docs
  • A DEP (Django Enhancement Proposal) drafted before coding begins, to align with the community
  • At least one real-world example demonstrating the feature (e.g., a reusable form component)

About Me

I’m a fresh graduate and junior software engineer working remotely for a US-based company. I have hands-on experience building Django projects professionally, and I’ve used django-cotton and django-components in real projects so I understand the pain points from a user perspective. I also have experience with component-based systems in React and Vue, which gives me a clear mental model of what good component semantics look like. I’ve contributed to open source before and I’m comfortable reading Django’s source code.


Questions for the Community

  1. Is there an existing DEP or prior discussion I should be aware of before drafting this formally?
  2. Would any mentors be interested in supporting this direction?
  3. Is the scope (350hr) reasonable, or should I narrow it to a specific subset (e.g., just slots and basic component tags)?

I’m committed to putting in the work and happy to discuss, iterate on the idea, or pivot based on community feedback. Thank you for your time.

Nureddin

2 Likes