... ss)s' を含めることができ、これにより小文字化されたアプリラベルと具体モデルのクラス名に置き換えられます。 CheckConstraint ( condition = Q ( age__gte = 18 ), name = " %(app_label)s _ %(class)s _is_adult" ) 制約のバリデーション 制約は モデルのバリデーション ... ionError を発生させます。 このメソッドはサブクラスで実装する必要があります。 CheckConstraint ¶ class CheckConstraint ( * , condition , name , violation_error_code = None , violation_error_message = None ) [ソース] ¶ データベースにチェック制約を作成します。 ... condition ¶ CheckConstraint. condition ¶ 制約が強制する条件チェックを指定する Q オブジェクトまたは真偽値の Expression です。 例: Che ... ... ss)s' を含めることができ、これにより小文字化されたアプリラベルと具体モデルのクラス名に置き換えられます。 CheckConstraint ( condition = Q ( age__gte = 18 ), name = " %(app_label)s _ %(class)s _is_adult" ) 制約のバリデーション 制約は モデルのバリデーション ... ionError を発生させます。 このメソッドはサブクラスで実装する必要があります。 CheckConstraint ¶ class CheckConstraint ( * , condition , name , violation_error_code = None , violation_error_message = None ) [ソース] ¶ データベースにチェック制約を作成します。 ... condition ¶ CheckConstraint. condition ¶ 制約が強制する条件チェックを指定する Q オブジェクトまたは真偽値の Expression です。 例: Che ... ... -Modified ヘッダを提供できます。これらのヘッダは HTTP レスポンス上ではオプションです。ヘッダはビュー関数で設定することも、 ConditionalGetMiddleware ミドルウェアを使用して ETag ヘッダを設定してもらうこともできます。 When the client next requests the same r ... epending on the header, if the page has been modified or does not match the ETag sent by the client, a 412 status code (Precondition Failed) may be returned. より細かい粒度のコントロールが必要な場合には、ビューごとの条件付き処理関数を使えます。 condition ... に対して、コンテンツが前回のリクエスト以降変更されていないことを伝えます。 これら 2 つの関数は django.views.decorators.http.condition デコレータのパラメータとして渡されます。このデコレータは、HTTP リクエストのヘッダがリソースのヘッダと一致するかどうかを調べ ... ... -Modified ヘッダを提供できます。これらのヘッダは HTTP レスポンス上ではオプションです。ヘッダはビュー関数で設定することも、 ConditionalGetMiddleware ミドルウェアを使用して ETag ヘッダを設定してもらうこともできます。 When the client next requests the same r ... epending on the header, if the page has been modified or does not match the ETag sent by the client, a 412 status code (Precondition Failed) may be returned. より細かい粒度のコントロールが必要な場合には、ビューごとの条件付き処理関数を使えます。 condition ... に対して、コンテンツが前回のリクエスト以降変更されていないことを伝えます。 これら 2 つの関数は django.views.decorators.http.condition デコレータのパラメータとして渡されます。このデコレータは、HTTP リクエストのヘッダがリソースのヘッダと一致するかどうかを調べ ... ... オプションで追加されます。 ExclusionConstraint ¶ class ExclusionConstraint ( * , name , expressions , index_type = None , condition = None , deferrable = None , include = None , violation_error_code = None , violation_error_message = None ) [ソース] ¶ デ ... d, the default index type is GIST . Changed in Django 6.1: Support for exclusion constraints using Hash indexes was added. condition ¶ ExclusionConstraint. condition ¶ 行の一部に制約をかける条件を指定する Q オブジェクト。たとえば、 condition=Q(cancelled=F ... alse) 。 これらの条件は、 django.db.models.Index.condition と同じデータベースの制約事項を持ちます。 deferrable ¶ ExclusionConstraint. deferrable ¶ 遅延可能な排他制約を作成するには、 ... ... オプションで追加されます。 ExclusionConstraint ¶ class ExclusionConstraint ( * , name , expressions , index_type = None , condition = None , deferrable = None , include = None , violation_error_code = None , violation_error_message = None ) [ソース] ¶ デ ... d, the default index type is GIST . Changed in Django 6.1: Support for exclusion constraints using Hash indexes was added. condition ¶ ExclusionConstraint. condition ¶ 行の一部に制約をかける条件を指定する Q オブジェクト。たとえば、 condition=Q(cancelled=F ... alse) 。 これらの条件は、 django.db.models.Index.condition と同じデータベースの制約事項を持ちます。 deferrable ¶ ExclusionConstraint. deferrable ¶ 遅延可能な排他制約を作成するには、 ... ... です。 Index オプション ¶ class Index ( * expressions , fields = () , name = None , db_tablespace = None , opclasses = () , condition = None , include = None ) [ソース] ¶ データベース内にインデックス (B-Tree) を作成します。 expressions ¶ Index. expressions ... を作成します。 opclasses はPostgreSQL以外のデータベースでは無視されます。 opclasses を使用する場合、 Index.name が必要です。 condition ¶ Index. condition ¶ テーブルが非常に大きくて、ほとんどクエリが行のサブセットを対象としている場合、インデックスをそのサブセ ... ットに制限すると役に立つかもしれません。条件を Q として指定してください。たとえば、 condition=Q(pages__gt=400) は、400ページ以上あるレコードにインデックスを作成します。 condition を使用する場合、 Index.name が必要です ... ... です。 Index オプション ¶ class Index ( * expressions , fields = () , name = None , db_tablespace = None , opclasses = () , condition = None , include = None ) [ソース] ¶ データベース内にインデックス (B-Tree) を作成します。 expressions ¶ Index. expressions ... を作成します。 opclasses はPostgreSQL以外のデータベースでは無視されます。 opclasses を使用する場合、 Index.name が必要です。 condition ¶ Index. condition ¶ テーブルが非常に大きくて、ほとんどクエリが行のサブセットを対象としている場合、インデックスをそのサブセ ... ットに制限すると役に立つかもしれません。条件を Q として指定してください。たとえば、 condition=Q(pages__gt=400) は、400ページ以上あるレコードにインデックスを作成します。 condition を使用する場合、 Index.name が必要です ... ... ne ( #30330 ). Prevented makemigrations from generating infinite migrations for check constraints and partial indexes when condition contains a range object ( #30350 ). Reverted an optimization in Django 2.2 ( #29725 ) that caused the inconsistent behavio ... eir case-insensitive variant) ( #30408 ). Fixed a migration crash on Oracle and SQLite when adding a check constraint with condition contains | ( OR ) operator ( #30412 ). 目次 Django 2.2.1 リリースノート バグ修正 前のトピックへ Django 2.2.2 リリースノート ... ピックへ Django 2.2 リリースノート 関連キーワード Fixed regression caused crash contains check using Oracle custom database condition many crashes raised StatReloader permissions proxy migration adding constraint リリースノート fixes several bugs バグ クイ ... ... ne ( #30330 ). Prevented makemigrations from generating infinite migrations for check constraints and partial indexes when condition contains a range object ( #30350 ). Reverted an optimization in Django 2.2 ( #29725 ) that caused the inconsistent behavio ... eir case-insensitive variant) ( #30408 ). Fixed a migration crash on Oracle and SQLite when adding a check constraint with condition contains | ( OR ) operator ( #30412 ). 目次 Django 2.2.1 リリースノート バグ修正 前のトピックへ Django 2.2.2 リリースノート ... ngo 2.2 リリースノート 関連キーワード Django Fixed regression caused crash contains check using Oracle custom database key condition object many crashes raised StatReloader permissions proxy 関連するページ Django 1.11.26 リリースノート Django 2.1.14 リリー ... 2026年10月08日