... ame = " %(app_label)s _ %(class)s _is_adult" ) 制約のバリデーション 制約は モデルのバリデーション の間にチェックされます。 BaseConstraint class BaseConstraint ( * name , violation_error_code = None , violation_error_message = None ) [ソース] すべての制約の基底 ... l() , validate() メソッドを実装しなければなりません。 すべての制約 (constraint) に共通するパラメータは以下の通りです: name BaseConstraint. name 制約の名前。制約には常に一意な名前を指定する必要があります。 violation_error_code BaseConstraint. violation_error_co ... デーション 中に ValidationError が発生した場合に使用されるエラーコードです。デフォルトは None です。 violation_error_message BaseConstraint. violation_error_message モデルのバリデーション の実行中に ValidationError が発生した場合に表示されるエラーメッセージです。 ... ... 既存の行と競合する場合も同様です。 排他制約は モデル バリデーション の間にチェックされます。 name ExclusionConstraint. name BaseConstraint.name を参照。 expressions ExclusionConstraint. expressions 2値タプルのイテラブル。最初の要素は式または文字列。2番目の要素は ... ion_error_message モデルのバリデーション 中に ValidationError が発生した場合に使用されるエラーメッセージです。デフォルトは BaseConstraint.violation_error_message です。 例 次の例では、キャンセルされた予約を考慮せずに、同じ部屋での重複する予約を制限しています。 ... ... ySet.aupdate_or_create() メソッドに、作成操作のために異なるフィールド値を指定できる create_defaults 引数が追加されました。 BaseConstraint 、 CheckConstraint 、および UniqueConstraint に violation_error_code 属性が追加され、 オブジェクトの検証 中に発生する Vali ... a2DivFormRenderer トランジショナルフォームレンダラーが非推奨になりました。 位置引数 name および violation_error_message を BaseConstraint に渡す方法は、キーワード専用引数を使用する方法に変更されるため、非推奨となりました。 request が ModelAdmin.lookup_allowed( ... ... necessary. The undocumented django.contrib.auth.views.SuccessURLAllowedHostsMixin mixin is replaced by RedirectURLMixin . BaseConstraint subclasses must implement validate() method to allow those constraints to be used for validation. The undocumented URLReso ... ... for details on these changes, including how to remove usage of these features. Support for passing positional arguments to BaseConstraint is removed. The DjangoDivFormRenderer and Jinja2DivFormRenderer transitional form renderers are removed. BaseDatabaseOpera ... ... .generic.dates のクラス) BaseBackend (django.contrib.auth.backends のクラス) BaseCommand (django.core.management のクラス) BaseConstraint (django.db.models のクラス) BaseDatabaseSchemaEditor (django.db.backends.base.schema のクラス) BaseDateDetailView (django. ... ld (django.forms のクラス) MultiWidget (django.forms のクラス) MVC N NAME setting name (Action の属性) (AppConfig の属性) (BaseConstraint の属性) (BoundField の属性) (ContentType の属性) (CreateExtension の属性) (DataSource の属性) (ExclusionConstraint の属性) ... ... スノート を参照してください。 DjangoDivFormRenderer と Jinja2DivFormRenderer の移行期間のフォームレンダラーが削除されます。 BaseConstraint への位置引数のサポートが削除されます。 ModelAdmin.lookup_allowed() サブクラスのシグネチャにおいて、 request は必須となりま ... 2026年10月08日