Django 2.2.x Documentationwhen the UniqueConstraint is violated. CheckConstraint class CheckConstraint(*, check, name) Creates a check constraint in the database. check CheckConstraint.check A Q object that specifies the check the constraint to enforce. For example, CheckConstraint(check=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than 18. name CheckConstraint.name The name of the constraint. UniqueConstraint age = models.IntegerField() class Meta: constraints = [ models.CheckConstraint(check=models.Q(age__gte=18), name='age_gte_18'), ] verbose_name Options.verbose_name0 码力 | 2915 页 | 2.83 MB | 2 年前3
Django 5.1.2 Documentationrespectively, by the lowercased app label and class name of the concrete model. For example CheckConstraint(condition=Q(age_gte=18), name='%(app_label)s_%(class)s_is_adult'). ## V alidation of subclass. CheckConstraint class CheckConstraint(*, condition, name, violation_error_code=None, violation_error_message=None) Creates a check constraint in the database. condition CheckConstraint.condition Expression that specifies the conditional check you want the constraint to enforce. For example, CheckConstraint(condition=Q(age_gte=18), name='age_gte_18') ensures the age field is never less than0 码力 | 2923 页 | 9.62 MB | 1 年前3
Django 5.1 Documentationrespectively, by the lowercased app label and class name of the concrete model. For example CheckConstraint(condition=Q(age_gte=18), name='%(app_label)s_%(class)s_is_adult'). ## V alidation of subclass. class CheckConstraint(*, condition, name, violation_error_code=None, violation_error_message=None) Creates a check constraint in the database. condition CheckConstraint.condition A Q object Expression that specifies the conditional check you want the constraint to enforce. For example, CheckConstraint(condition=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than0 码力 | 2917 页 | 9.59 MB | 1 年前3
Django 4.2.x Documentationrespectively, by the lowercased app label and class name of the concrete model. For example CheckConstraint(check=Q(age__gte=18), name='%(app_label)s_% (class)s_is_adult'). Validation of Constraints Constraints implemented by a subclass. CheckConstraint class CheckConstraint(*, check, name, violation_error_message=None) Creates a check constraint in the database. check CheckConstraint.check A Q object or boolean boolean Expression that specifies the check you want the constraint to enforce. For example, CheckConstraint(check=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than 18. Oracle Checks0 码力 | 3305 页 | 3.16 MB | 2 年前3
Django 5.0.x Documentationrespectively, by the lowercased app label and class name of the concrete model. For example CheckConstraint(check=Q(age_gte=18), name='%(app_label)s_%(class)s_is_adult'). Constraints are subclass. ## CheckConstraint class CheckConstraint(*, check, name, violation_error_code=None, violation_error_message=None) Creates a check constraint in the database. check CheckConstraint.check A Q boolean Expression that specifies the check you want the constraint to enforce. For example, CheckConstraint(check=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than 180 码力 | 2878 页 | 9.60 MB | 2 年前3
Django 3.2.x Documentationrespectively, by the lowercased app label and class name of the concrete model. For example CheckConstraint(check=Q(age__gte=18), name='%(app_label)s_% (class)s_is_adult'). Validation of Constraints In when the UniqueConstraint is violated. CheckConstraint class CheckConstraint(*, check, name) Creates a check constraint in the database. check CheckConstraint.check A Q object or boolean Expression that enforce. For example, CheckConstraint(check=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than 18. Support for boolean Expression was added. name CheckConstraint.name The name of the0 码力 | 3121 页 | 3.08 MB | 2 年前3
Django 3.2.x Documentationrespectively, by the lowercased app label and class name of the concrete model. For example CheckConstraint(check=Q(age__gte=18), name='%(app_label)s_%(class)s_is_adult'). Validation of Constraints In validation when the UniqueConstraint is violated. CheckConstraint class CheckConstraint(*, check, name) Creates a check constraint in the database. check CheckConstraint.check A Q object or boolean Expression that that specifies the check you want the constraint to enforce. For example, CheckConstraint(check=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than 18. Support for boolean Expression0 码力 | 2199 页 | 7.89 MB | 2 年前3
Django 4.1.x Documentationrespectively, by the lowercase app label and class name of the concrete model. For example CheckConstraint(check=Q(age\_gte=18), name='%(app\_label)s\_%(class)s\_is\_adult').| |Validation of Constraints| implemented by a subclass. CheckConstraint class CheckConstraint(*, check, name, violation_error_message=None) Creates a check constraint in the database. check CheckConstraint.check A Q object or boolean boolean Expression that specifies the check you want the constraint to enforce. For example, CheckConstraint(check=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than 180 码力 | 2777 页 | 9.32 MB | 2 年前3
Django 4.2.x Documentationrespectively, by the lowercased app label and class name of the concrete model. For example CheckConstraint(check=Q(age_gte=18), name='%(app_label)s_%(class)s_is_adult'). Validation of Constraints implemented by a subclass. CheckConstraint class CheckConstraint(*, check, name, violation_error_message=None) Creates a check constraint in the database. check CheckConstraint.check A Q object or boolean boolean Expression that specifies the check you want the constraint to enforce. For example, CheckConstraint(check=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than 180 码力 | 2842 页 | 9.47 MB | 2 年前3
Django 5.0.x Documentationrespectively, by the lowercased app label and class name of the concrete model. For example CheckConstraint(check=Q(age__gte=18), name='%(app_label)s_%(class)s_is_adult'). Validation of Constraints subclass. ## CheckConstraint class CheckConstraint(*, check, name, violation_error_code=None, violation_error_message=None) Creates a check constraint in the database. ## check CheckConstraint.check A boolean Expression that specifies the check you want the constraint to enforce. For example, CheckConstraint(check=Q(age__gte=18), name='age_gte_18') ensures the age field is never less than 180 码力 | 3407 页 | 3.21 MB | 2 年前3
共 16 条
- 1
- 2













