Latest in branch 6.0
6.0.6
Released 03 Jun 2026
(10 days ago)
SoftwareDjango
Version6.0
Status
Supported
Supported
Python versions
Python 3.12 - 3.14
Initial release6.0
03 Dec 2025
(6 months ago)
Latest release6.0.6
03 Jun 2026
(10 days ago)
End of
mainstream support
31 Aug 2026
(Ends in 2 months)
End of
extended support
30 Apr 2027
(Ends in 10 months)
Release noteshttps://docs.djangoproject.com/en/6.0/releases/6.0/
Source codehttps://github.com/django/django/tree/6.0.6
Django 6.0 ReleasesView full list

What is New in Django 6.0

Django 6.0 is a major release that brings modern Python support, stronger security defaults, improved database features, and many quality-of-life enhancements. It requires Python 3.10 or newer and continues the focus on making development faster, safer, and more enjoyable.

Python and Third-Party Compatibility

Django 6.0 officially supports Python versions 3.10, 3.11, 3.12, and 3.13. Older versions like Python 3.8 and 3.9 are no longer supported. Many popular third-party packages already work well with Django 6.0, but always test your specific dependencies during upgrade.

Security Improvements

Content-Security-Policy Headers Made Easier

New helpers simplify adding CSP headers to responses. You can now set policies directly on views or middleware.

from django.csp import csp_header

@csp_header("default-src 'self'; script-src 'self' https://cdn.example.com")
def my_view(request):
    return render(request, "template.html")
Better Default Security Settings

Several settings now have stricter defaults, including improved cookie security and protection against common attacks.

Database and ORM Enhancements

Partial Indexes

Create database indexes that only apply to rows matching a condition. Great for filtering out soft-deleted or inactive records.

class Meta:
    indexes = [
        models.Index(fields=['status'], name='active_idx', condition=models.Q(status='active'))
    ]
Background Database Tasks

Run heavy operations like bulk updates or complex queries in the background using Django's new async-capable task runner.

Geometry Field Improvements

New GeometryDistance expression and better support for spatial lookups.

BigAutoField as Default Primary Key

All new models now use 64-bit BigAutoField by default instead of the old 32-bit AutoField. Existing projects keep their current behavior.

Forms and Validation

New Formset Features

Better support for dynamic forms, improved error handling, and new methods for working with extra forms.

Atomic Decorators for Views

Use @atomic on class-based views to wrap the entire request in a database transaction.

Improved Message Framework

Messages now support safe HTML by default when using the safe extra tag, and the storage backend has been simplified.

Admin and Management Commands

New aggregate.all() Method

A cleaner way to apply multiple aggregations without grouping.

Better Admin Search and Filtering

Enhanced search fields and list filters with improved performance and usability.

New inspectdb Improvements

The inspectdb command now generates more accurate model definitions from existing databases.

Dropped Support and Backward-Incompatible Changes

Django 6.0 removes several old features to keep the framework modern and secure:

  • Python 3.8 and 3.9 are no longer supported
  • Old URL resolver syntax has been removed
  • Default AutoField replaced with BigAutoField for new projects
  • Many deprecated APIs from Django 4.x and 5.x are now fully removed
  • is_popup variable in admin templates removed
  • Old password hasher aliases dropped
  • Support for very old database versions removed (PostgreSQL 11, MySQL 5.7, etc.)

Dependency Updates

Minimum required versions for key libraries have been raised:

Library Minimum Version
asgiref3.8.0
sqlparse0.5.0
Pillow10.0.0
tzdata2023.3
PostgreSQL12+
MySQL8.0.11+
MariaDB10.5+
SQLite3.33+

Upgrade Tips

Before upgrading to Django 6.0:

  • Upgrade to Django 5.1 first and resolve all deprecation warnings
  • Test your project on Python 3.10 or higher
  • Check third-party apps for Django 6.0 compatibility
  • Update your primary keys if still using old AutoField
  • Review security settings and CSP configuration

Final Thoughts

Django 6.0 delivers a cleaner, faster, and more secure foundation for building web applications. With modern Python support, powerful new database features, and smarter defaults, it helps developers write better code with less effort. This release continues Django's tradition of evolving while staying stable and reliable.

Releases In Branch 6.0

VersionRelease date
6.0.603 Jun 2026
(10 days ago)
6.0.505 May 2026
(1 month ago)
6.0.407 Apr 2026
(2 months ago)
6.0.303 Mar 2026
(3 months ago)
6.0.203 Feb 2026
(4 months ago)
6.0.106 Jan 2026
(5 months ago)
6.003 Dec 2025
(6 months ago)
6.0rc119 Nov 2025
(6 months ago)
6.0b122 Oct 2025
(7 months ago)
6.0a117 Sep 2025
(8 months ago)