# Django 6.1 - Product: Django (https://whatsnew.fyi/product/django) - Vendor: Django Software Foundation - Date: 2026-08-05 - Version: 6.1 - Original notes: https://pypi.org/project/Django/6.1/ - Permalink: https://whatsnew.fyi/product/django/releases/6.1 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — Model field fetch modes allow configurable on-demand fetching behavior with FETCH_ONE, FETCH_PEERS, and FETCH_RAISE modes via QuerySet.fetch_mode() - **added** — ForeignKey.on_delete now supports database-level delete options DB_CASCADE, DB_SET_NULL, and DB_SET_DEFAULT using SQL ON DELETE clause - **added** — New MAILERS setting supports configuring multiple email backends with different options - **added** — Admin site login view now redirects authenticated users to the next URL if available - **added** — Admin FilteredSelectMultiple widget now uses optgroups to preserve named groups - **added** — Admin change list now selects only foreign key fields specified in list_display instead of all foreign key fields when list_select_related is False - **added** — New delete_confirmation_max_display option allows customizing how many objects are displayed on admin delete confirmation pages before truncation - **added** — Admin change forms now display form fields below their labels, help text after labels, and validation errors after help text for improved accessibility - **added** — Admin list_display now uses boolean icons for boolean fields on related models - **added** — New location keyword argument of action() decorator specifies which admin views the action is available on - **added** — New description_plural keyword argument of action() decorator specifies human-readable description for actions on admin change list page - **changed** — Default iteration count for PBKDF2 password hasher increased from 1,200,000 to 1,500,000 - **added** — Permission.name and Permission.codename values are now renamed when renaming models via migration - **added** — New Permission.user_perm_str property returns string suitable for use with User.has_perm() - **added** — isempty lookup and IsEmpty() database function are now supported on SpatiaLite - **deprecated** — EMAIL_BACKEND and related EMAIL_* settings will be replaced by MAILERS in Django 7.0 and now issue deprecation warnings #### Django 6.1 release notes August 5, 2026 Welcome to Django 6.1! These release notes cover the new features, as well as some backwards incompatible changes you’ll want to be aware of when upgrading from Django 6.0 or earlier. We’ve begun the deprecation process for some features. See the How to upgrade Django to a newer version guide if you’re updating an existing project. Mainstream support is expected to end in April 2027. Extended support is expected to end in December 2027. ##### Python compatibility Django 6.1 supports Python 3.12, 3.13, and 3.14. We highly recommend, and only officially support, the latest release of each series. ##### What’s new in Django 6.1 ###### Model field fetch modes The on-demand fetching behavior of model fields is now configurable with fetch modes. These modes allow you to control how Django fetches data from the database when an unfetched field is accessed. Django provides three fetch modes: - FETCH_ONE, the default, fetches the missing field for the current instance only. This mode represents Django’s existing behavior. - FETCH_PEERS fetches a missing field for all instances that came from the same QuerySet. This mode works like an on-demand prefetch_related(). It can reduce most cases of the “N+1 queries problem” to two queries without any work to maintain a list of fields to prefetch. - FETCH_RAISE raises a FieldFetchBlocked exception. This mode can prevent unintentional queries in performance-critical sections of code. Use the new method QuerySet.fetch_mode() to set the fetch mode for model instances fetched by the QuerySet: from django.db import models books = Book.objects.fetch_mode(models.FETCH_PEERS) for book in books: print(book.author.name) Despite the loop accessing the author foreign key on each instance, the FETCH_PEERS fetch mode will make the above example perform only two queries: - Fetch all books. - Fetch associated authors. See fetch modes for more details. ###### Database-level delete options for ForeignKey.on_delete ForeignKey.on_delete now supports database-level delete options: - DB_CASCADE - DB_SET_NULL - DB_SET_DEFAULT These options handle deletion logic entirely within the database, using the SQL ON DELETE clause. They are thus more efficient than the existing Python-level options, as Django does not need to load objects before deleting them. As a consequence, the DB_CASCADE option does not trigger the pre_delete or post_delete signals. ###### Mailers The new MAILERS setting supports configuring multiple email backends with different options, similar to existing mechanisms for CACHES, DATABASES, STORAGES, and TASKS: MAILERS = { "default": { "BACKEND": "django.core.mail.backends.smtp.EmailBackend", "OPTIONS": {"host": "smtp.example.com", "use_tls": True}, }, "marketing": { "BACKEND": "example.third.party.EmailBackend", "OPTIONS": {"region": "africa-1"}, }, } You can select a mailer with the new using argument to email sending functions, or obtain an email backend instance with mail.mailers[alias]. See Sending email for more details. MAILERS is not yet enabled by default in existing projects. It will replace EMAIL_BACKEND and related EMAIL_* settings in Django 7.0. Until then, the older settings will continue to work but will issue deprecation warnings: see the list of email deprecations below. You can opt into the new feature at any time before Django 7.0; see Migrating email to mailers. To ease the transition, mail.mailers["default"] works with either MAILERS or the deprecated EMAIL_BACKEND setting defined. The deprecated get_connection() function will also return an instance of the default mailer when MAILERS is defined. ###### Minor features ###### django.contrib.admin - The admin site login view now redirects authenticated users to the next URL, if available, instead of always redirecting to the admin index page. - The admin’s FilteredSelectMultiple widget now uses s to preserve named groups (e.g. choices=[("Group", [("1", "Item")]), ...]). - When Mode _[Truncated at 4000 characters — full notes: https://pypi.org/project/Django/6.1/]_