... 。各バージョン系列の最新リリースのみを公式にサポートし、最新リリースを使用することを 強く推奨 します。 Django 2.2 の新機能 ¶ Constraints ¶ The new CheckConstraint and UniqueConstraint 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. ... licts parameter of QuerySet.bulk_create() to True tells the database to ignore failure to insert rows that fail uniqueness constraints or other checks. The new ExtractIsoYear function extracts ISO-8601 week-numbering years from DateField and DateTimeField , ... ... 。各バージョン系列の最新リリースのみを公式にサポートし、最新リリースを使用することを 強く推奨 します。 Django 2.2 の新機能 ¶ Constraints ¶ The new CheckConstraint and UniqueConstraint 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. ... licts parameter of QuerySet.bulk_create() to True tells the database to ignore failure to insert rows that fail uniqueness constraints or other checks. The new ExtractIsoYear function extracts ISO-8601 week-numbering years from DateField and DateTimeField , ... ... ます。これらはモデル Meta.constraints オプションで追加されます。 ExclusionConstraint ¶ class ExclusionConstraint ( * , name , expressions , index_type = None , ... tching is case insensitive. If not provided, the default index type is GIST . Changed in Django 6.1: Support for exclusion constraints using Hash indexes was added. condition ¶ ExclusionConstraint. condition ¶ 行の一部に制約をかける条件を指定する Q オブジェ ... ラメータを設定します。使用可能な値は Deferrable.DEFERRED または Deferrable.IMMEDIATE です。例: from django.contrib.postgres.constraints import ExclusionConstraint from django.contrib.postgres.fields import RangeOperators from django.db.models import Deferrab ... ... ます。これらはモデル Meta.constraints オプションで追加されます。 ExclusionConstraint ¶ class ExclusionConstraint ( * , name , expressions , index_type = None , ... tching is case insensitive. If not provided, the default index type is GIST . Changed in Django 6.1: Support for exclusion constraints using Hash indexes was added. condition ¶ ExclusionConstraint. condition ¶ 行の一部に制約をかける条件を指定する Q オブジェ ... ラメータを設定します。使用可能な値は Deferrable.DEFERRED または Deferrable.IMMEDIATE です。例: from django.contrib.postgres.constraints import ExclusionConstraint from django.contrib.postgres.fields import RangeOperators from django.db.models import Deferrab ... ... プデートパスが必要な場合は、 pytz_deprecation_shim と USE_DEPRECATED_PYTZ 移行用設定の使用が推奨されます。 Functional unique constraints ¶ The new *expressions positional argument of UniqueConstraint() enables creating functional unique constraints on express ... l ): first_name = models . CharField ( max_length = 255 ) last_name = models . CharField ( max_length = 255 ) class Meta : constraints = [ UniqueConstraint ( Lower ( "first_name" ), Lower ( "last_name" ) . desc (), name = "first_last_name_unique" , ), ] Fun ... ctional unique constraints are added to models using the Meta.constraints option. scrypt password hasher ¶ The new scrypt password hasher is more sec ... ... れます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されていますが、利便性のために django.db.models にインポートされています。標準的な規約は from django.db import model ... 約には常にユニークな名前を指定する必要があります。また、通常は抽象基底クラスで制約を指定することはできません。なぜなら Meta.constraints オプションはサブクラスに継承され、そのたびに( name を含む)属性がまったく同じ値になってしまうからです。名前の衝突を回避す ... 制約は、トランザクションが終了するまで実行されません。即時 (IMMEDIATE) 制約は、すべてのコマンドの直後に実行されます。 Unique constraints with condition , include , opclasses , or expressions may be implemented as unique indexes rather than unique constraints. ... ... プデートパスが必要な場合は、 pytz_deprecation_shim と USE_DEPRECATED_PYTZ 移行用設定の使用が推奨されます。 Functional unique constraints ¶ The new *expressions positional argument of UniqueConstraint() enables creating functional unique constraints on express ... l ): first_name = models . CharField ( max_length = 255 ) last_name = models . CharField ( max_length = 255 ) class Meta : constraints = [ UniqueConstraint ( Lower ( "first_name" ), Lower ( "last_name" ) . desc (), name = "first_last_name_unique" , ), ] Fun ... ctional unique constraints are added to models using the Meta.constraints option. scrypt password hasher ¶ The new scrypt password hasher is more sec ... ... れます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されていますが、利便性のために django.db.models にインポートされています。標準的な規約は from django.db import model ... 約には常にユニークな名前を指定する必要があります。また、通常は抽象基底クラスで制約を指定することはできません。なぜなら Meta.constraints オプションはサブクラスに継承され、そのたびに( name を含む)属性がまったく同じ値になってしまうからです。名前の衝突を回避す ... 制約は、トランザクションが終了するまで実行されません。即時 (IMMEDIATE) 制約は、すべてのコマンドの直後に実行されます。 Unique constraints with condition , include , opclasses , or expressions may be implemented as unique indexes rather than unique constraints. ... ... 3.2 that caused a crash validating "NaN" input with a forms.DecimalField when additional constraints, e.g. max_value , were specified ( #32949 ). Fixed a bug in Django 3.2 where a system check would crash on a model with a ... ノート 関連キーワード バグ 修正 Fixed crash many リリースノート August regression caused validating input forms DecimalField constraints were specified system check model reverse relation inherited parent クイック検索 Last update: 2026年10月09日 « previous | ... ... 込まれています。 バグ修正 ¶ ArrayField の __len ルックアップに関する長年のバグが修正されました。このバグは、 Meta.constraints を使用したモデル検証がクラッシュする原因となっていました ( #34205 )。 目次 Django 4.1.5 リリースノート バグ修正 前のトピッ ... Django 4.1.4 リリースノート 関連キーワード バグ 修正 リリースノート Transifex 最新 翻訳 ArrayField ルックアップ 長年 Meta constraints モデル 検証 クラッシュ 原因 クイック検索 Last update: 2026年10月09日 « previous | up | next » ... 2026年10月08日