... ssion causing incorrect queries for __in subquery lookups when models use ForeignKey.to_field ( #28101 ). Fixed crash when overriding the template of django.views.static.directory_index() ( #28122 ). Fixed a regression in formset min_num validation with un ... s SplitArrayWidget to use template-based widget rendering ( #28040 ). Fixed crash in BaseGeometryWidget.get_context() when overriding existing attrs ( #28105 ). Prevented AddIndex and RemoveIndex from mutating model state ( #28043 ). Prevented migrations f ... ... アライズ (シリアル化) Subclasses of models defining the natural_key() method can now opt out of natural key serialization by overriding the method to return an empty tuple: () . This ensures primary keys are serialized when using dumpdata --natural-primary . ... ribute. The undocumented connection() method of log.AdminEmailHandler has been removed and is no longer called. Subclasses overriding AdminEmailHandler.send_mail() should avoid calling connection() . See Replacing get_connection() and connection arguments ... ted and will change from "sha1" to "sha256" in Django 2028. Pass an explicit algorithm to silence the deprecation warning. Overriding ModelAdmin.get_actions() without the new action_location parameter is deprecated. Unpacking or indexing the dictionary val ... ... inSite.password_change() method now has an extra_context parameter. You can now control who may login to the admin site by overriding only AdminSite.has_permission() and AdminSite.login_form . The base.html template has a new block usertools which contains ... ュー) Generic views that use MultipleObjectMixin may now specify the ordering applied to the queryset by setting ordering or overriding get_ordering() . The new SingleObjectMixin.query_pk_and_slug attribute allows changing the behavior of get_object() so tha ... rings representing module paths. This allows importing several format modules from different reusable apps. It also allows overriding those custom formats in your main Django project. ロギング The django.utils.log.AdminEmailHandler class now has a send_mai ... ... > in the django/contrib/admin/templates/admin/change_list.html template added in Django 6.0 that could be problematic when overriding the pagination block ( #37029 ). Fixed a bug in Django 6.0 where deprecation warnings incorrectly skipped lines from third ... ... フォーム Formsets may control the widget used when ordering forms via can_order by setting the ordering_widget attribute or overriding get_ordering_widget . 国際化 (internationalization) Added the LANGUAGE_COOKIE_HTTPONLY , LANGUAGE_COOKIE_SAMESITE , and LA ... ass)s' placeholders. The new Field.descriptor_class attribute allows model fields to customize the get and set behavior by overriding their descriptors . Avg and Sum now support the distinct argument. Added SmallAutoField which acts much like an AutoField ... able the GROUP BY primary key-only optimization for unmanaged models, you have to subclass the PostgreSQL database engine, overriding the features class allows_group_by_selected_pks_on_model() method as you require. See Subclassing the built-in database ba ... ... ing values on SQLite ( #37275 ). Fixed a regression in Django 6.1 that caused a crash when iterating a QuerySet of a model overriding Model.from_db() without the new fetch_mode keyword argument. Such overrides now work again, but are deprecated and should ... ... ttribute set to True . ModelAdmin will raise ValueError if its get_list_select_related() method returns True . Support for overriding ModelAdmin.get_actions() without the new action_location parameter will be removed. Support for unpacking or indexing the ... dictionary values of the ModelAdmin.get_actions() return value will be removed. Use Action attributes instead. Support for overriding ModelAdmin.get_action_choices() without the new action_location parameter will be removed. The django.db.transaction.savep ... gregates.StringAgg will be removed. Support for subclasses of RemoteUserMiddleware that override process_request() without overriding aprocess_request() will be removed. 6.0 これらの変更の詳細については、 Django 5.0 リリースノート を参照してください。 Djan ... ... of EmailMessage and EmailMultiAlternatives have changed significantly, closely examine any custom subclasses that rely on overriding undocumented, internal underscore methods. DEFAULT_AUTO_FIELD setting now defaults to BigAutoField Since Django 3.2, when ... tails on these changes, including how to remove usage of these features. django.urls.register_converter() no longer allows overriding existing converters. The ModelAdmin.log_deletion() and LogEntryManager.log_action() methods are removed. The undocumented ... ... なり、ブラウザで disabled の状態でウィジェットを表示できるようになりました。 It's now possible to customize bound fields by overriding a field's get_bound_field() method. ジェネリックビュー (汎用ビュー) as_view() メソッドで生成されたクラスベースのビューに v ... l and only active if DEBUG=True . mail_admins : filtered at the ERROR level and only active if DEBUG=False . If you aren't overriding Django's default logging, you should see minimal changes in behavior, but you might see some new logging to the runserver ... console, for example. If you are overriding Django's default logging, you should check to see how your configuration merges with the new defaults. HttpRequest details ... ... ge . デコレータ Django provides decorators to control the Content Security Policy headers on a per-view basis. These allow overriding or disabling the enforced or report-only policy for specific views, providing fine-grained control when the global setting ... 2026年10月08日