Django 6.0: A Sneak Peek Into the Future of Web Development
Django, one of the most powerful and widely used web frameworks, is gearing up for its next major release: Django 6.0, expected in December…

Django, one of the most powerful and widely used web frameworks, is gearing up for its next major release: Django 6.0, expected in December 2025. This new version brings a host of improvements, security enhancements, and some backward-incompatible changes that developers need to be aware of.
In this article, we’ll explore the highlights of Django 6.0, including new features, deprecations, and what you need to do to ensure a smooth upgrade from Django 5.2.

Python Compatibility
Django 6.0 will support Python 3.12 and 3.13, making it essential for developers to upgrade their projects to the latest Python versions.
- End of Support for Older Python Versions: Django 5.2 is the last version to support Python 3.10 and 3.11. If your project relies on these versions, it’s time to upgrade.
For package maintainers, it’s recommended to drop support for Django versions before 5.2 to align with the latest development standards.
What’s New in Django 6.0?
Django 6.0 introduces several new features and improvements across different modules:
Authentication & Security
- Increased PBKDF2 Password Hashing Iteration: The default iteration count for the PBKDF2 password hasher has been increased from 1,000,000 to 1,200,000, enhancing security.
Admin Panel Enhancements
- Customizable Password Change Form: A new
AdminSite.password_change_form
attribute allows developers to customize the admin site’s password change form, offering better flexibility.
GIS (Geospatial Features)
- New GEOSGeometry.hasm Property: This property checks whether a geometry includes the M dimension, improving geospatial data handling.
- Rotate Database Function: A new
Rotate
function enables rotating a geometry by a specified angle, either around the origin or a chosen point.
Migrations
- Nested Squashed Migrations: Now, squashed migrations can be further squashed before transitioning to normal migrations, making database management cleaner.
Templates
- New
forloop.length
Variable: Inside a Django template’s{% for %}
loop, you can now accessforloop.length
, which provides the total number of items in the loop.
Breaking Changes in Django 6.0
Dropped Support for MariaDB 10.5
Since MariaDB 10.5 support ends in June 2025, Django 6.0 will only support MariaDB 10.6 and later.
Dropped Support for Python < 3.12
All optional dependencies must now be compatible with Python 3.12 or higher. Key libraries with confirmed support include:
aiosmtpd 1.4.5
bcrypt 4.1.1
Pillow 10.1.0
psycopg2 2.9.9
selenium 4.23.0
Database API Changes
BaseDatabaseCreation.create_test_db(serialize)
is deprecated: Useserialize_db_to_string()
instead.
Deprecated & Removed Features
Deprecated Features
BaseDatabaseCreation.create_test_db(serialize)
→ Useserialize_db_to_string()
.
Removed Features
Several features have been completely removed in Django 6.0, including:
- Positional arguments for
BaseConstraint
- Legacy
DjangoDivFormRenderer
andJinja2DivFormRenderer
- Support for
cx_Oracle
ForeignObject.get_reverse_joining_columns()
method- Calling
format_html()
without passing arguments - Default scheme for
forms.URLField
changed from HTTP to HTTPS
If your project depends on any of these features, you’ll need to refactor your code before upgrading to Django 6.0.
How to Prepare for Django 6.0
- Upgrade to Python 3.12 or later to ensure compatibility.
- Check for deprecations using
python -Wd
to identify outdated features in your project. - Update third-party packages that might rely on deprecated Django features.
- Refactor database operations to align with Django 6.0’s new constraints and features.
- Test your project thoroughly before upgrading to catch breaking changes early.
Final Thoughts
Django 6.0 is shaping up to be a solid upgrade with improved security, better database handling, and enhanced template capabilities. While it brings some breaking changes, following best practices for upgrades will ensure a smooth transition.
Stay ahead of the curve by preparing your projects for Django 6.0 now!
Are you excited about Django 6.0? Let us know in the comments!
