per page, with , order by , clip by
Results of 1 - 10 of about 42 for constraints (0.003 sec.)
Django 2.2 リリースノート 14090
Django 2.2 リリースノート April 1, 2019 Django 2.2 へようこそ! このリリースノートでは、 バージョン 2.2 の新機能 と、Django 2.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... )。各バージョン系列の最新リリースのみを公式にサポートし、最新リリースを使用することを 強く推奨 します。 Django 2.2 の新機能 Constraints The new CheckConstraint and UniqueConstraint classes enable adding custom database constraints. Constraints are added to m ... odels using the Meta.constraints option. マイナーな機能 django.contrib.admin Added a CSS class to the column headers of TabularInline . django.contrib.auth ... 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 , ...
https://man.mtool.work/django/6.1/releases/2.2.html
PostgreSQL 固有のデータベース制約 12928
PostgreSQL 固有のデータベース制約 PostgreSQL は django.contrib.postgres.constraints モジュールから利用できる追加のデータ整合性制約をサポートしています。これらはモデル Meta.constraints オプションで追加されます。 ExclusionConstraint class Exc ... 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 ... 。 例 次の例では、キャンセルされた予約を考慮せずに、同じ部屋での重複する予約を制限しています。 from django.contrib.postgres.constraints import ExclusionConstraint from django.contrib.postgres.fields import DateTimeRangeField , RangeOperators from django.db i ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/constraints.html
制約 (Constraint) リファレンス 9878
制約 (Constraint) リファレンス このモジュールで定義されたクラスはデータベース制約を作成します。これらはモデルの Meta.constraints オプションで追加されます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されています ... 約には常にユニークな名前を指定する必要があります。また、通常は抽象基底クラスで制約を指定することはできません。なぜなら Meta.constraints オプションはサブクラスに継承され、そのたびに( name を含む)属性がまったく同じ値になってしまうからです。名前の衝突を回避す ... 制約は、トランザクションが終了するまで実行されません。即時 (IMMEDIATE) 制約は、すべてのコマンドの直後に実行されます。 Unique constraints with condition , include , opclasses , or expressions may be implemented as unique indexes rather than unique constraints. ... nulls_distinct = False ) これは、 ordering カラムに NULL 値を格納できるのは1行だけというユニーク制約を作成します。 Unique constraints with nulls_distinct are ignored for databases besides PostgreSQL. violation_error_code UniqueConstraint. violation_error_c ...
https://man.mtool.work/django/6.1/ref/models/constraints.html
Django 4.0 リリースノート 9584
Django 4.0 リリースノート 2021年12月7日 Django 4.0 へようこそ! このリリースノートでは、 バージョン 4.0 の新機能 と、Django 3.2 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... プデートパスが必要な場合は、 pytz_deprecation_shim と USE_DEPRECATED_PYTZ 移行用設定の使用が推奨されます。 Functional unique constraints The new *expressions positional argument of UniqueConstraint() enables creating functional unique constraints on expressio ... 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 secur ...
https://man.mtool.work/django/6.1/releases/4.0.html
Django 4.1 リリースノート 9584
Django 4.1 リリースノート 2022年8月3日 Django 4.1 へようこそ! このリリースノートでは、 バージョン 4.1 の新機能 と、Django 4.0 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... s support as it evolves. See 非同期クエリ for details and limitations. 制約のバリデーション Check , unique , and exclusion constraints defined in the Meta.constraints option are now checked during model validation . Form rendering accessibility In order to ... t values. SpGistIndex now supports covering indexes on PostgreSQL 14+. ExclusionConstraint now supports covering exclusion constraints using SP-GiST indexes on PostgreSQL 14+. The new default_bounds attribute of DateTimeRangeField and DecimalRangeField allo ... . after database server restart. QuerySet.bulk_create() now supports updating fields when a row insertion fails uniqueness constraints. This is supported on MariaDB, MySQL, PostgreSQL, and SQLite 3.24+. QuerySet.iterator() now supports prefetching related o ...
https://man.mtool.work/django/6.1/releases/4.1.html
モデルインスタンスリファレンス 8701
モデルインスタンスリファレンス このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおいた方がよいでしょう。 このリファレン ... e model as a whole - Model.clean() Validate the field uniqueness - Model.validate_unique() 制約を検証する - Model.validate_constraints() モデルの full_clean() メソッドを使うと、4 つ全てのステップが実行されます。 When you use a ModelForm , the call to is_val ... fields from the ModelForm that require validation. Model. full_clean ( exclude = None , validate_unique = True , validate_constraints = True ) [ソース] This method calls Model.clean_fields() , Model.clean() , Model.validate_unique() (if validate_unique is ... True ), and Model.validate_constraints() (if validate_constraints is True ) in that order and raises a ValidationError that has a message_dict attribute containi ...
https://man.mtool.work/django/6.1/ref/models/instances.html
Django 0.96 リリースノート 8562
Django 0.96 リリースノート Django 0.96 へようこそ! The primary goal for 0.96 is a cleanup and stabilization of the features introduced in 0.95. There have been a few small backwards-incompatible changes since 0.95, but the upgrade process s ... nds against an existing database may generate SQL with the new form of constraint name, while the database itself contains constraints named in the old form; this will cause the database server to raise an error message about modifying nonexistent constrain ... . Examine the output of manage.py sqlall to see the new-style constraint names, and use that as a guide to rename existing constraints in your database. Name changes in manage.py A few of the options to manage.py have changed with the addition of fixture su ...
https://man.mtool.work/django/6.1/releases/0.96.html
Django 3.2.6 リリースノート 8268
Django 3.2.6 リリースノート August 2, 2021 Django 3.2.6 では、3.2.5 におけるいくつかのバグを修正しました。 バグ修正 Fixed a regression in Django 3.2 that caused a crash validating "NaN" input with a forms.DecimalField when additional constraints ...
https://man.mtool.work/django/6.1/releases/3.2.6.html
Django 4.1.5 リリースノート 8268
Django 4.1.5 リリースノート 2023年1月2日 Django 4.1.5 では、4.1.4 における1件のバグが修正されています。また、Transifex からの最新の文字列翻訳が組み込まれています。 バグ修正 ArrayField の __len ルックアップに関する長年のバグが修正されました。 ... このバグは、 Meta.constraints を使用したモデル検証がクラッシュする原因となっていました ( #34205 )。 ...
https://man.mtool.work/django/6.1/releases/4.1.5.html
モデルの Meta オプション 7974
モデルの Meta オプション このドキュメントでは、モデル内部の class Meta 内でモデルに与えられる、すべての可能な メタデータオプション を説明します。 利用可能な Meta オプション abstract Options. abstract abstract = True の場合、このモデルは 抽象 ... lds = [ "first_name" ], name = "first_name_idx" ), ] unique_together Options. unique_together 代わりに UniqueConstraint を constraints オプションとともに使用してください。 UniqueConstraint は unique_together よりも多くの機能を提供します。 unique_together は ... 用してみてください。 制約に違反したときにモデル検証中に発生する ValidationError は unique_together エラーコードを持ちます。 constraints Options. constraints モデルに定義したい 制約 のリスト: from django.db import models class Customer ( models . Model ): age ... = models . IntegerField () class Meta : constraints = [ models . CheckConstraint ( condition = models . Q ( age__gte = 18 ), name = "age_gte_18" ), ] verbose_name Options. ve ...
https://man.mtool.work/django/6.1/ref/models/options.html
PREV 1 2 3 4 5 NEXT