Django 6.1.x
Django 6.1 is largely about query efficiency and configuration clarity. Model field
fetch modes give you control over how deferred fields are loaded and a way to make
accidental N+1 queries raise instead of quietly firing, foreign keys can now push
deletion down into the database itself, and email configuration moves from a pile of
loose EMAIL_* settings to a single structured MAILERS dictionary. This release
keeps the Python 3.12 minimum introduced in 6.0, but raises the floor on every
supported database.
Release Highlights:
- Model field fetch modes:
QuerySet.fetch_mode()acceptsFETCH_ONE,FETCH_PEERS, orRAISE.FETCH_PEERSloads a missing field for every instance in the QuerySet at once, acting like an on-demandprefetch_related(), whileRAISEraisesFieldFetchBlockedso unintended queries fail loudly instead of silently. - Database-level deletes:
ForeignKey.on_deletegainsDB_CASCADE,DB_SET_NULL, andDB_SET_DEFAULT, which emit a SQLON DELETEclause and let the database handle cascades. These are faster than the Python-level equivalents but do not sendpre_deleteorpost_deletesignals. - New
MAILERSsetting: configure several named email backends, each with its own options, and select between them by name. - New database functions and aggregates:
JSONNullfor representing a top-level JSONnull,UUID4andUUID7generators, andBitAnd,BitOr, andBitXoraggregates. - Admin improvements: the form layout was reworked for accessibility,
delete_confirmation_max_displaycaps how many related objects are listed on a delete confirmation, and admin actions accept alocationparameter. - Stronger password hashing: the default PBKDF2 iteration count rises to 1,500,000.
- Forms: a new
Stylesheetasset object for media declarations, andFilePathField.set_choices().
Upgrade Gotchas:
- Requires Python 3.12, 3.13, or 3.14. This is unchanged from Django 6.0.
- Database minimums all move up: PostgreSQL 15 or later, MySQL 8.4 or later, MariaDB 10.11 or later, and SQLite 3.37 or later. Check your production database version before you start.
- Every
EMAIL_*setting is deprecated in favour ofMAILERS, along withmail.get_connection()and theconnection,fail_silently,auth_user, andauth_passwordarguments to the email helpers. They keep working in 6.1 but are scheduled for removal in Django 7.0, so this is the release to start migrating. - Several email calls that used to be ignored now raise: passing
fail_silently,auth_user, orauth_passwordalongsideconnectionraisesTypeError, and aBccentry inheadersraisesValueError. - Cache keys changed for pages and fragments that vary on arguments. Expect a one-time wave of cache misses immediately after deploying.
first()andlast()no longer fall back to ordering by primary key when the ordering has been cleared, which can change which row you get back.- SQL aliases are now quoted consistently. Raw SQL that referenced an unquoted alias may need updating.
- GIS drops PostGIS 3.1, GEOS 3.8 and 3.9, and GDAL 3.1 and 3.2.
- Removed in this release: the
allargument tostaticfiles.finders.find(), replaced byfind_all; therequest.userfallback inauth.login(); and theorderingargument on PostgreSQL aggregates, replaced byorder_by.
Roadmap
See the official Django 6.1 roadmap on djangoproject.com for planned releases and milestones.
Supported Python Versions
- Python 3.12
- Python 3.13
- Python 3.14
Release Type
Released Versions
| Version | Release Date | Release Type | Blog Post | Release Notes | GitHub |
|---|---|---|---|---|---|
| 6.1 | 2026-08-05 |
RELEASE
|
Blog Post | Release Notes | GitHub |
| 6.1rc1 | 2026-07-22 |
RC
|
Blog Post | Release Notes | GitHub |
| 6.1b1 | 2026-06-24 |
BETA
|
Blog Post | Release Notes | GitHub |
| 6.1a1 | 2026-05-20 |
ALPHA
|
Blog Post | Release Notes | GitHub |