... not advised to have apps without migrations depend on (have a ForeignKey or ManyToManyField to) apps with migrations. App-loading refactor ¶ Historically, Django applications were tightly linked to models. A singleton known as the "app cache" dealt wit ... method defined on them as well , though Django provides a handy class decorator that will work for most applications. App-loading changes ¶ Start-up sequence ¶ Django 1.7 loads application configurations and models as soon as it starts. While this beha ... applications that are listed in INSTALLED_APPS or have an explicit app_label . Models aren't imported as a side-effect of loading their application. Specifically, you shouldn't import models in the root module of an application nor in the module that d ... ... not advised to have apps without migrations depend on (have a ForeignKey or ManyToManyField to) apps with migrations. App-loading refactor ¶ Historically, Django applications were tightly linked to models. A singleton known as the "app cache" dealt wit ... method defined on them as well , though Django provides a handy class decorator that will work for most applications. App-loading changes ¶ Start-up sequence ¶ Django 1.7 loads application configurations and models as soon as it starts. While this beha ... applications that are listed in INSTALLED_APPS or have an explicit app_label . Models aren't imported as a side-effect of loading their application. Specifically, you shouldn't import models in the root module of an application nor in the module that d ... ... L 10+ when adding a foreign key and changing data in the same migration ( #31106 ). Fixed a regression in Django 3.0 where loading fixtures crashed for models defining a default for the primary key ( #31071 ). 目次 Django 3.0.2 リリースノート バグ修正 前 ... umns referenced clause QuerySet exists queryset contained aggregation over caused crash PostgreSQL adding foreign changing loading クイック検索 Last update: 2026年10月09日 « previous | up | next » ... ... to set up test data at the class level. Using this technique can speed up the tests as compared to using setUp() . Fixture loading within TestCase is now performed once for the whole TestCase . マイナーな機能 ¶ django.contrib.admin ¶ ModelAdmin now has ... -ignorenonexistent option now ignores data for models that no longer exist. runserver now uses daemon threads for faster reloading. inspectdb now outputs Meta.unique_together . It is also able to introspect AutoField for MySQL and PostgreSQL databases. ... llows giving the migration(s) a custom name instead of a generated one. The loaddata command now prevents repeated fixture loading. If FIXTURE_DIRS contains duplicates or a default fixture directory path ( app_name/fixtures ), an exception is raised. Th ... ... to set up test data at the class level. Using this technique can speed up the tests as compared to using setUp() . Fixture loading within TestCase is now performed once for the whole TestCase . マイナーな機能 ¶ django.contrib.admin ¶ ModelAdmin now has ... -ignorenonexistent option now ignores data for models that no longer exist. runserver now uses daemon threads for faster reloading. inspectdb now outputs Meta.unique_together . It is also able to introspect AutoField for MySQL and PostgreSQL databases. ... llows giving the migration(s) a custom name instead of a generated one. The loaddata command now prevents repeated fixture loading. If FIXTURE_DIRS contains duplicates or a default fixture directory path ( app_name/fixtures ), an exception is raised. Th ... ... to the model. You may, for example, want to disable handlers that access related fields that aren't present during fixture loading and would otherwise raise an exception: from django.db.models.signals import post_save from .models import MyModel def my_ ... handler ( ** kwargs ): # disable the handler during fixture loading if kwargs [ "raw" ]: return ... post_save . connect ( my_handler , sender = MyModel ) このロジックをカプセル化するデコレー ... from functools import wraps def disable_for_loaddata ( signal_handler ): """ Decorator that turns off signal handlers when loading fixture data. """ @wraps ( signal_handler ) def wrapper ( * args , ** kwargs ): if kwargs [ "raw" ]: return signal_handler ... ... to the model. You may, for example, want to disable handlers that access related fields that aren't present during fixture loading and would otherwise raise an exception: from django.db.models.signals import post_save from .models import MyModel def my_ ... handler ( ** kwargs ): # disable the handler during fixture loading if kwargs [ "raw" ]: return ... post_save . connect ( my_handler , sender = MyModel ) このロジックをカプセル化するデコレー ... from functools import wraps def disable_for_loaddata ( signal_handler ): """ Decorator that turns off signal handlers when loading fixture data. """ @wraps ( signal_handler ) def wrapper ( * args , ** kwargs ): if kwargs [ "raw" ]: return signal_handler ... ... ould either insert it using test fixtures , or using the setUp() method of your test case. Changed priority of translation loading ¶ Work has been done to simplify, rationalize and properly document the algorithm used by Django at runtime to build trans ... . As the fixes are moving upstream, this is now deprecated - you should use from django.http import SimpleCookie instead. Loading of project-level translations ¶ This release of Django starts the deprecation process for inclusion of translations locate ... ges FormSet updates Callables in templates Use of custom SQL to load initial data in tests Changed priority of translation loading Transaction management No password reset for inactive users Password reset view now accepts from_email Features deprecated ... ... ould either insert it using test fixtures , or using the setUp() method of your test case. Changed priority of translation loading ¶ Work has been done to simplify, rationalize and properly document the algorithm used by Django at runtime to build trans ... . As the fixes are moving upstream, this is now deprecated - you should use from django.http import SimpleCookie instead. Loading of project-level translations ¶ This release of Django starts the deprecation process for inclusion of translations locate ... ges FormSet updates Callables in templates Use of custom SQL to load initial data in tests Changed priority of translation loading Transaction management No password reset for inactive users Password reset view now accepts from_email Features deprecated ... ... L 10+ when adding a foreign key and changing data in the same migration ( #31106 ). Fixed a regression in Django 3.0 where loading fixtures crashed for models defining a default for the primary key ( #31071 ). 目次 Django 3.0.2 リリースノート バグ修正 前 ... 2026年10月08日