... it more efficient or even blocking it. Use QuerySet.fetch_mode() to set the fetch mode for model instances fetched by a QuerySet : from django.db import models books = Book . objects . fetch_mode ( models . FETCH_PEERS ) Fetch mo ... dels . CASCADE ) ... …and this loop: for book in books : print ( book . author . name ) …where books is a QuerySet of Book instances using some fetch mode. FETCH_ONE Fetches the missing field for the current instance only. This is the default mode. Using ... eads to performance issues when N is large. FETCH_PEERS Fetches the missing field for the current instance and its "peers"—instances that came from the same initial QuerySet . The behavior of this mode is based on the assumption that if you need a field f ... ... thod allows adding errors to specific form fields from anywhere without having to worry about the details such as creating instances of django.forms.utils.ErrorList or dealing with Form.cleaned_data . This new API replaces manipulating Form._errors which ... soon as the errors were added to Form.errors . Form.errors and django.forms.utils.ErrorList now store the ValidationError instances so these metadata can be retrieved at any time through the new Form.errors.as_data method. The retrieved ValidationError i ... nd the internal storages of ValidationError . These containers which used to store error strings now store ValidationError instances and public APIs have been adapted to make this as transparent as possible, but if you've been using private APIs, some of ... ... ge abuse in model formsets with editable primary keys Model formsets incorrectly allowed forged POST data to either delete instances outside the limiting queryset or create instances via edit-only formsets when the model's primary key could be set through ... es when setting delete_confirmation_max_display to 0 ( #37386 ). Fixed a bug in Django 6.1 where FETCH_PEERS did not batch instances loaded by select_related() , causing unnecessary queries ( #37344 ). Fixed a bug in Django 6.1 where permissions were not ... ... to the Django security policy . CVE-2026-4277: Privilege abuse in GenericInlineModelAdmin Add permissions on inline model instances were not validated on submission of forged POST data in GenericInlineModelAdmin . This issue has severity "low" according ... -2026-4292: Privilege abuse in ModelAdmin.list_editable Admin changelist forms using list_editable incorrectly allowed new instances to be created via forged POST data. This issue has severity "low" according to the Django security policy . CVE-2026-33033 ... ... to the Django security policy . CVE-2026-4277: Privilege abuse in GenericInlineModelAdmin Add permissions on inline model instances were not validated on submission of forged POST data in GenericInlineModelAdmin . This issue has severity "low" according ... -2026-4292: Privilege abuse in ModelAdmin.list_editable Admin changelist forms using list_editable incorrectly allowed new instances to be created via forged POST data. This issue has severity "low" according to the Django security policy . CVE-2026-33033 ... ... or 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 ... 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 bo ... s. Tasks The task() decorator now accepts **kwargs , which are forwarded to the backend's task_class . Task and TaskResult instances can now be pickled and unpickled. テスト assertContains() and assertNotContains() can now be called multiple times on the ... ... to the Django security policy . CVE-2026-4277: Privilege abuse in GenericInlineModelAdmin Add permissions on inline model instances were not validated on submission of forged POST data in GenericInlineModelAdmin . This issue has severity "low" according ... -2026-4292: Privilege abuse in ModelAdmin.list_editable Admin changelist forms using list_editable incorrectly allowed new instances to be created via forged POST data. This issue has severity "low" according to the Django security policy . CVE-2026-33033 ... ... ing of long model names in the admin's navigation sidebar ( #31854 ). Fixed encoding session data while upgrading multiple instances of the same project to Django 3.1 ( #31864 ). Adjusted admin's navigation sidebar template to reduce debug logging when re ... g model was not locked ( #31866 ). Fixed a data loss possibility, following a regression in Django 2.0, when copying model instances with a cached fields value ( #31863 ). Fixed a regression in Django 3.1 that caused a crash when decoding an invalid sessi ... ... ge abuse in model formsets with editable primary keys Model formsets incorrectly allowed forged POST data to either delete instances outside the limiting queryset or create instances via edit-only formsets when the model's primary key could be set through ... ... ge abuse in model formsets with editable primary keys Model formsets incorrectly allowed forged POST data to either delete instances outside the limiting queryset or create instances via edit-only formsets when the model's primary key could be set through ... 2026年10月08日