... トアップされます。 match 正規表現パターンです。この表現と一致する名前のファイルのみが選択肢として許可されます。 allow_files Optional. Either True or False . Default is True . Specifies whether files in the specified location should be included. Either t ... his or allow_folders must be True . allow_folders Optional. Either True or False . Default is False . Specifies whether folders in the specified location should be included. Eithe ... ChoiceField will have an empty choice at the top of the list. You can change the text of this label (which is "- Select an option -" by default) with the empty_label attribute, or you can disable the empty label entirely by setting empty_label to None ... ... so of the error message. Try adding your operating system to the search query if needed. If you have trouble installing an optional test dependency, you can skip that dependency locally. For example, if installing pylibmc fails, comment out its line in ... sts.py . Tests that require pylibmc will be skipped automatically. See Running all the tests for details on installing the optional test dependencies. Running the tests requires a Django settings module that defines the databases to use. To help you ge ... gs=my_postgres_settings ). The remainder of this documentation shows commands for running tests without tox , however, any option passed to runtests.py can also be passed to tox by prefixing the argument list with -- , as above. Tox also respects the D ... ... nished doing its job. Commands from alternate package formats like eggs are now also discovered. The new dumpdata --output option allows specifying a file to which the serialized data is written. The new makemessages --exclude and compilemessages --exc ... lude options allow excluding specific locales from processing. compilemessages now has a --use-fuzzy or -f option which includes fuzzy ... translations into compiled files. The loaddata --ignorenonexistent option now ignores data for models that no longer exist. runserver now uses daemon threads for faster reloading. inspectdb now ou ... ... ueConstraint classes enable adding custom database constraints. Constraints are added to models using the Meta.constraints option. マイナーな機能 django.contrib.admin Added a CSS class to the column headers of TabularInline . django.contrib.auth The Ht ... ows searching for a phrase or raw expression. django.contrib.staticfiles Added path matching to the collectstatic --ignore option so that patterns like /vendor/*.js can be used. データベースバックエンド Added result streaming for QuerySet.iterator() on ... 国際化 (internationalization) Added support and translations for the Armenian language. 管理コマンド The new --force-color option forces colorization of the command output. inspectdb now creates models for foreign tables on PostgreSQL. inspectdb --incl ... ... しています。 複数の選択肢をレンダリングするウィジェットは、各選択肢をレンダリングするために使用されるテンプレートを指定する option_template_name 属性を持っています。例えば、 Select ウィジェットの場合、 select_option.html は <select> のための <option> を ... 必要がある場合は True を返す callable です。 Select class Select [ソース] template_name : 'django/forms/widgets/select.html' option_template_name : 'django/forms/widgets/select_option.html' レンダリング結果: <select><option ...>...</select> choices フォー ... オーバーライドします。 NullBooleanSelect class NullBooleanSelect [ソース] template_name : 'django/forms/widgets/select.html' option_template_name : 'django/forms/widgets/select_option.html' 'Unknown'、'Yes'、'No' の選択肢ウィジェット SelectMultiple class ... ... SS and ARIA role affordances. This requires using 'django.template.context_processors.request' in the 'context_processors' option of OPTIONS . Initially empty extra inlines can now be removed, in the same way as dynamically created ones. XRegExp がバー ... ing algorithm remains until Django 4.0. django.contrib.contenttypes The new remove_stale_contenttypes --include-stale-apps option allows removing stale content types from previously installed apps that have been removed from INSTALLED_APPS . django.con ... イテレートする for details. django.forms.DateTimeField now accepts dates in a subset of ISO 8601 datetime formats, including optional timezone, e.g. 2019-10-10T06:47 , 2019-10-10T06:47:23+04:00 , or 2019-10-10T06:47:23Z . The timezone will always be reta ... ... . An example is the PostgreSQL ON UPDATE trigger which returns NULL . In such cases it is possible to set django.db.models.Options.select_on_save flag to force saving to use the old algorithm. マイナーな機能 Authentication backends can raise Permission ... cation of the presence of valid settings in commands that ask for it by using the BaseCommand.can_import_settings internal option is now performed independently from handling of the locale that should be active during the execution of the command. The ... latter can now be influenced by the new BaseCommand.leave_locale_alone internal option. See 管理コマンドとロケール for more details. The success_url of DeletionMixin is now interpolated with its object 's __di ... ... ervice file のサービス名と password file のパスワードを使用して接続するためには、それらを DATABASES 内のデータベース設定の OPTIONS 部分で指定しなければなりません。 settings.py DATABASES = { "default" : { "ENGINE" : "django.db.backends.postgresql" , "OP ... vice] host=localhost user=USER dbname=NAME port=5432 .my_pgpass localhost:5432:NAME:USER:PASSWORD PostgreSQLバックエンドは OPTIONS の内容をキーワード引数として接続コンストラクタに渡します。これにより、ドライバの動作をより高度に制御できます。利用可能なす ... ています。 REPEATABLE READ や SERIALIZABLE などのより高いレベルの分離レベルが必要な場合は、 DATABASES 内のデータベース設定の OPTIONS 部分に指定してください。 from django.db.backends.postgresql.psycopg_any import IsolationLevel DATABASES = { # ... "OPTION ... ... tionary expansion, as the **kwargs passed to these methods. CVE-2022-28347: Potential SQL injection via QuerySet.explain(**options) on PostgreSQL QuerySet.explain() method was subject to SQL injection in option names, using a suitably crafted dictionar ... y, with dictionary expansion, as the **options argument. バグ修正 Fixed a regression in Django 3.2.4 that caused the auto-reloader to no longer detect changes when the ... DIRS option of the TEMPLATES setting contained an empty string ( #33628 ). ... ... tionary expansion, as the **kwargs passed to these methods. CVE-2022-28347: Potential SQL injection via QuerySet.explain(**options) on PostgreSQL QuerySet.explain() method was subject to SQL injection in option names, using a suitably crafted dictionar ... y, with dictionary expansion, as the **options argument. バグ修正 Fixed a regression in Django 4.0 that caused ignoring multiple FilteredRelation() relationships to the ... eld ( #33598 ). Fixed a regression in Django 3.2.4 that caused the auto-reloader to no longer detect changes when the DIRS option of the TEMPLATES setting contained an empty string ( #33628 ). ... 2026年10月08日