{"title":"Django 6.1.1 release notes","version":"dev","locale":"en","docname":"releases/6.1.1","url":"/en/dev/releases/6.1.1/","canonical":"https://djangodocs.dev/en/dev/releases/6.1.1/","summary":"Django 6.1.1 fixes one crash in Django 5.2 and several bugs in 6.1. Fixed a crash in Django 5.2 when combining distinct(*fields) with order_by() and…","html":"<h1>Django 6.1.1 release notes<a class=\"heading-anchor\" href=\"#django-6-1-1-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>September 2, 2026</em></p>\n<p>Django 6.1.1 fixes one crash in Django 5.2 and several bugs in 6.1.</p>\n<section id=\"bugfixes\">\n<h2>Bugfixes<a class=\"heading-anchor\" href=\"#bugfixes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p>Fixed a crash in Django 5.2 when combining <a class=\"reference internal\" href=\"/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.distinct\" title=\"django.db.models.query.QuerySet.distinct\"><code class=\"xref py py-meth docutils literal notranslate\">distinct(*fields)</code></a> with <code class=\"docutils literal notranslate\">order_by()</code> and <code class=\"docutils literal notranslate\">values()</code> and using two\nlookup paths resolving to the same column (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37222\">#37222</a>).</p></li>\n<li><p>Fixed a regression in Django 6.1 where the deprecation of double-dot variable\nlookups incorrectly applied to string and translated template literals\ncontaining two consecutive dots, such as <code class=\"docutils literal notranslate\">{{ &quot;a..b&quot; }}</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37257\">#37257</a>).</p></li>\n<li><p>Fixed a regression in Django 6.1 where <a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display\" title=\"django.contrib.admin.ModelAdmin.list_display\"><code class=\"xref py py-attr docutils literal notranslate\">ModelAdmin.list_display</code></a>\nentries that traverse multiple relations using <code class=\"docutils literal notranslate\">__</code> could crash or display\nincorrect values (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37270\">#37270</a>).</p></li>\n<li><p>Fixed a bug in Django 6.1 where the <code class=\"docutils literal notranslate\">fields.E323</code> system check did not\ndetect mixed <code class=\"docutils literal notranslate\">on_delete</code> variants for auto-created intermediate models for\n<code class=\"docutils literal notranslate\">ManyToManyField</code>s (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37254\">#37254</a>).</p></li>\n<li><p>Fixed a regression in Django 6.1 where custom querysets used with\n<a class=\"reference internal\" href=\"/en/dev/ref/models/querysets/#django.db.models.Prefetch\" title=\"django.db.models.Prefetch\"><code class=\"xref py py-class docutils literal notranslate\">Prefetch</code></a> for forward foreign key or reverse\none-to-one relationships were not routed using the parent queryset’s\ndatabase (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37300\">#37300</a>).</p></li>\n<li><p>Fixed a regression in Django 6.1 where HTML-safe strings, such as those\ncreated with <a class=\"reference internal\" href=\"/en/dev/ref/utils/#django.utils.safestring.mark_safe\" title=\"django.utils.safestring.mark_safe\"><code class=\"xref py py-func docutils literal notranslate\">mark_safe()</code></a>, used as form media\nassets were treated as asset paths rather than being rendered verbatim\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37262\">#37262</a>).</p></li>\n<li><p>Fixed a regression in Django 6.1 that caused <code class=\"docutils literal notranslate\">AlterField</code> operations that\nchanged only the Python-level <code class=\"docutils literal notranslate\">on_delete</code> option of <code class=\"docutils literal notranslate\">ForeignKey</code> or\n<code class=\"docutils literal notranslate\">OneToOneField</code> fields to perform unnecessary schema changes\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37260\">#37260</a>).</p></li>\n<li><p>Fixed a bug in Django 6.1 where <a class=\"reference internal\" href=\"/en/dev/ref/models/fields/#django.db.models.DecimalField\" title=\"django.db.models.DecimalField\"><code class=\"xref py py-class docutils literal notranslate\">DecimalField</code></a>\nwithout <code class=\"docutils literal notranslate\">max_digits</code> and <code class=\"docutils literal notranslate\">decimal_places</code> caused a crash when retrieving\nvalues on SQLite (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37275\">#37275</a>).</p></li>\n<li><p>Fixed a regression in Django 6.1 that caused a crash when iterating a\n<code class=\"docutils literal notranslate\">QuerySet</code> of a model overriding <code class=\"docutils literal notranslate\">Model.from_db()</code> without the new\n<code class=\"docutils literal notranslate\">fetch_mode</code> keyword argument. Such overrides now work again, but are\ndeprecated and should be updated to accept <code class=\"docutils literal notranslate\">fetch_mode</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37259\">#37259</a>).</p></li>\n<li><p>Fixed a regression in Django 6.1 where an admin changelist search crashed\nwhen a <code class=\"docutils literal notranslate\">search_fields</code> entry used an <code class=\"docutils literal notranslate\">__exact</code> lookup on a field with\n<code class=\"docutils literal notranslate\">choices</code>, and where any search term matched all rows with a <code class=\"docutils literal notranslate\">True</code>\nvalue when an <code class=\"docutils literal notranslate\">__exact</code> lookup was used on a <code class=\"docutils literal notranslate\">BooleanField</code>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37263\">#37263</a>).</p></li>\n<li><p>Fixed a regression in Django 6.1 that caused <code class=\"docutils literal notranslate\">__in</code> lookups on annotations\nto erroneously return empty querysets and <code class=\"docutils literal notranslate\">__range</code> lookups to crash when\npassed an iterator (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37311\">#37311</a>).</p></li>\n<li><p>Fixed a bug in Django 6.1 where <a class=\"reference internal\" href=\"/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.in_bulk\" title=\"django.db.models.query.QuerySet.in_bulk\"><code class=\"xref py py-meth docutils literal notranslate\">QuerySet.in_bulk()</code></a> chained after\n<a class=\"reference internal\" href=\"/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.values\" title=\"django.db.models.query.QuerySet.values\"><code class=\"xref py py-meth docutils literal notranslate\">QuerySet.values()</code></a> or <a class=\"reference internal\" href=\"/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.values_list\" title=\"django.db.models.query.QuerySet.values_list\"><code class=\"xref py py-meth docutils literal notranslate\">QuerySet.values_list()</code></a> could drop selected\nannotations or produce incorrect mapping keys (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/37312\">#37312</a>).</p></li>\n</ul>\n</section>","rootId":"django-6-1-1-release-notes","toc":[{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/6.1.2","title":"Django 6.1.2 release notes","url":"/en/dev/releases/6.1.2/"},"next":{"docname":"releases/6.1","title":"Django 6.1 release notes","url":"/en/dev/releases/6.1/"},"formats":{"html":"/en/dev/releases/6.1.1/","markdown":"/en/dev/releases/6.1.1.md","json":"/en/dev/releases/6.1.1.json"},"source":"https://github.com/django/django/blob/main/docs/releases/6.1.1.txt","official":"https://docs.djangoproject.com/en/dev/releases/6.1.1/","inVersions":["dev","6.1"],"inLocales":["en"]}