Django, the Python web framework, has released Django 6.0, delivering a collection of developer-focused features, security enhancements, and performance improvements aimed at modernizing web application development.
Django 6.0 introduces several major features, including a built-in background tasks framework, native Content Security Policy support, template partials for component-based development, and adoption of Python’s modern email API. The release also includes support for Python 3.12, 3.13, and 3.14, while dropping support for Python 3.10 and 3.11.
Django 6.0 ships with the built-in Tasks framework, which enables running code outside the HTTP request-response cycle without requiring third-party libraries like Celery. This allows developers to offload work such as sending emails or processing data to background workers.
Once defined, tasks can be enqueued through a configured backend. Django handles task creation and queuing, though execution must still be managed by external infrastructure. The feature has generated considerable enthusiasm from the community, with a user on Hacker News commenting: “I love Django, and the new tasks framework to replace celery looks great.”
Elsewhere on reddit, one developer posted: I’m most excited about the builtin background Tasks. Looking forward to test this out
. However, the framework’s minimal default configuration has drawn criticism from some users:
Very disappointed that the new background task doesn’t come with a default basic db backend and worker as it did in the original django-task.
That would have covered the needs of so many basic apps l. Where you just need them to send some emails and run some crons.
Django 6.0 also brings built-in support for Content Security Policy, making it easier to protect web applications against cross-site scripting and other content injection attacks. CSP policies can be enforced using the ContentSecurityPolicyMiddleware, with policies configured through Python dictionaries and Django-provided constants.
Template partials represent another major enhancement, allowing developers to encapsulate and reuse named fragments within template files. The new partialdef and partial tags enable more modular templates without splitting components into separate files.
The release includes improvements to async support with AsyncPaginator and AsyncPage classes, expanded database function support across backends including StringAgg now available beyond PostgreSQL, and enhanced GIS capabilities with new geometry functions and lookups.
For developers migrating from earlier versions, Django provides a comprehensive upgrade guide.
Django is an open-source web framework developed and maintained by the Django Software Foundation. It emphasizes rapid development, clean design, and pragmatic solutions for building web applications. Django powers numerous high-traffic websites and is widely adopted across industries, with strong support for both traditional server-rendered applications and modern API-driven architectures.
