... 。各バージョン系列の最新リリースのみを公式にサポートし、最新リリースを使用することを 強く推奨 します。 Django 3.2 の新機能 ¶ Automatic AppConfig discovery ¶ Most pluggable applications define an AppConfig subclass in an apps.py submodule. Many define a ... _init__.py . When the apps.py submodule exists and defines a single AppConfig subclass, Django now uses that configuration automatically, so you can remove default_app_config . default_app_config made it possible to declare only the application's pat ... atibility with the former style, with the intent to switch the ecosystem to the latter, but the switch didn't happen. With automatic AppConfig discovery, default_app_config is no longer needed. As a consequence, it's deprecated. See アプリケーションを ... ... 。各バージョン系列の最新リリースのみを公式にサポートし、最新リリースを使用することを 強く推奨 します。 Django 3.2 の新機能 ¶ Automatic AppConfig discovery ¶ Most pluggable applications define an AppConfig subclass in an apps.py submodule. Many define a ... _init__.py . When the apps.py submodule exists and defines a single AppConfig subclass, Django now uses that configuration automatically, so you can remove default_app_config . default_app_config made it possible to declare only the application's pat ... atibility with the former style, with the intent to switch the ecosystem to the latter, but the switch didn't happen. With automatic AppConfig discovery, default_app_config is no longer needed. As a consequence, it's deprecated. See アプリケーションを ... ... ドを参照してください。 自動インポートをカスタマイズする ¶ shell 管理コマンドの自動インポート動作をカスタマイズするには、 get_auto_imports() メソッドをオーバーライドします。このメソッドは、アプリケーションで利用可能なオブジェクトまたはモジュールのインポ ... anagement/commands/shell.py ¶ from django.core.management.commands import shell class Command ( shell . Command ): def get_auto_imports ( self ): return super () . get_auto_imports () + [ "django.urls.reverse" , "django.urls.resolve" , ] The customiz ... mport. このようにカスタムした shell コマンドを verbosity=2 を付けて実行すると、次のように表示されます: 13 objects imported automatically: from django.db import connection, reset_queries, models from django.conf import settings from django.contrib.adm ... ... url = forms . URLField () ... comment = forms . CharField () ... >>> f = CommentForm ( initial = { "name" : "instance" }, auto_id = False ) >>> print ( f ) <div>Name:<input type="text" name="name" value="instance" required></div> <div>Url:<input typ ... ctForm インスタンスに影響を与えます。 >>> f . base_fields [ "subject" ] . label_suffix = "?" >>> another_f = ContactForm ( auto_id = False ) >>> another_f . as_div () . split ( "</div>" )[ 0 ] '<div><label for="id_subject">Subject?</label><input type ... らにフォーム行のレンダリングをカスタマイズすることができます。 フォーム要素の HTML id 属性と <label> タグを設定する ¶ Form. auto_id ¶ デフォルトでは、フォームをレンダリングするメソッドは次のものを含みます: フォーム要素に対する HTML id 属性。 ラベルの前 ... ... ドを参照してください。 自動インポートをカスタマイズする ¶ shell 管理コマンドの自動インポート動作をカスタマイズするには、 get_auto_imports() メソッドをオーバーライドします。このメソッドは、アプリケーションで利用可能なオブジェクトまたはモジュールのインポ ... anagement/commands/shell.py ¶ from django.core.management.commands import shell class Command ( shell . Command ): def get_auto_imports ( self ): return super () . get_auto_imports () + [ "django.urls.reverse" , "django.urls.resolve" , ] The customiz ... mport. このようにカスタムした shell コマンドを verbosity=2 を付けて実行すると、次のように表示されます: 13 objects imported automatically: from django.db import connection, reset_queries, models from django.conf import settings from django.contrib.adm ... ... url = forms . URLField () ... comment = forms . CharField () ... >>> f = CommentForm ( initial = { "name" : "instance" }, auto_id = False ) >>> print ( f ) <div>Name:<input type="text" name="name" value="instance" required></div> <div>Url:<input typ ... ctForm インスタンスに影響を与えます。 >>> f . base_fields [ "subject" ] . label_suffix = "?" >>> another_f = ContactForm ( auto_id = False ) >>> another_f . as_div () . split ( "</div>" )[ 0 ] '<div><label for="id_subject">Subject?</label><input type ... らにフォーム行のレンダリングをカスタマイズすることができます。 フォーム要素の HTML id 属性と <label> タグを設定する ¶ Form. auto_id ¶ デフォルトでは、フォームをレンダリングするメソッドは次のものを含みます: フォーム要素に対する HTML id 属性。 ラベルの前 ... ... o 2.2.1 where SearchVector generates SQL with a redundant Coalesce call ( #30488 ). Fixed a regression in Django 2.2 where auto-reloader doesn't detect changes in manage.py file when using StatReloader ( #30479 ). Fixed crash of ArrayAgg and StringAg ... g with ordering argument when used in a Subquery ( #30315 ). Fixed a regression in Django 2.2 that caused a crash of auto-reloader when an exception with custom signature is raised ( #30516 ). Fixed a regression in Django 2.2.1 where auto-reloa ... jango 2.2.1 リリースノート 関連キーワード Fixed regression jQuery AdminURLFieldWidget using clickable link provided extend auto reloader before validator bundled pollution prototype used admin ordering StatReloader crash リリースノート June fixes sec ... ... .postgres ¶ The new Lexeme expression for full text search provides fine-grained control over search terms. Lexeme objects automatically escape their input and support logical combination operators ( & , | , ~ ), prefix matching, and term weighting. ... mands now create the custom target directory if it doesn't exist. Common utilities, such as django.conf.settings , are now automatically imported to the shell by default. マイグレーション ¶ Squashed migrations can now themselves be squashed before be ... ficantly, 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 the DEFAULT_AUTO_FIELD setting was added, the default ... ... o 2.2.1 where SearchVector generates SQL with a redundant Coalesce call ( #30488 ). Fixed a regression in Django 2.2 where auto-reloader doesn't detect changes in manage.py file when using StatReloader ( #30479 ). Fixed crash of ArrayAgg and StringAg ... g with ordering argument when used in a Subquery ( #30315 ). Fixed a regression in Django 2.2 that caused a crash of auto-reloader when an exception with custom signature is raised ( #30516 ). Fixed a regression in Django 2.2.1 where auto-reloa ... リリースノート 関連キーワード Django Fixed regression jQuery AdminURLFieldWidget value using clickable link provided extend auto reloader before validator bundled pollution Object prototype used 関連するページ Django 2.1.9 リリースノート Django 1.11.2 ... ... .postgres ¶ The new Lexeme expression for full text search provides fine-grained control over search terms. Lexeme objects automatically escape their input and support logical combination operators ( & , | , ~ ), prefix matching, and term weighting. ... mands now create the custom target directory if it doesn't exist. Common utilities, such as django.conf.settings , are now automatically imported to the shell by default. マイグレーション ¶ Squashed migrations can now themselves be squashed before be ... ficantly, 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 the DEFAULT_AUTO_FIELD setting was added, the default ... 2026年10月08日