per page, with , order by , clip by
Results of 1 - 10 of about 65 for unique (0.063 sec.)
制約 (Constraint) リファレンス 15602
制約 (Constraint) リファレンス このモジュールで定義されたクラスはデータベース制約を作成します。これらはモデルの Meta.constraints オプションで追加されます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されています ... 、次のように記述します: CheckConstraint ( condition = Q ( age__gte = 18 ) | Q ( age__isnull = True ), name = "age_gte_18" ) UniqueConstraint class UniqueConstraint ( * expressions , fields = () , name , condition = None , deferrable = None , include = N ... opclasses = () , nulls_distinct = None , violation_error_code = None , violation_error_message = None ) [ソース] Creates a uniqueness guarantee in the database, enforced by either a unique constraint or a unique index depending on the options used. Con ... straint vs. index implementation Setting only UniqueConstraint.fields creates a true database constraint ( ADD CONSTRAINT ... UNIQUE ). Specifying any of UniqueConstraint.expr ...
https://man.mtool.work/django/6.1/ref/models/constraints.html
モデルフィールドリファレンス 10005
モデルフィールドリファレンス このドキュメントには、Django が提供するフィールドオプション field options とフィールド型 field types を含む、 Field のすべての API リファレンスが記載されています。 注釈 フィールドは django.db.models.fields に定義 ... が NULL と空文字列の 2 通りになります。多くの場合、「データなし」を表す値が 2 つあるのは冗長です。例外として、 CharField に unique=True と blank=True の両方を設定する場合があります。この状況では、空文字列のオブジェクトを複数保存する際に一意制約違反を避け ... 簡単にアクセスできるようになっています。 警告 これらのプロパティ名をメンバ名として使用することはできません。 The use of enum.unique() is enforced to ensure that values cannot be defined multiple times. This is unlikely to be expected in choices for a fie ... メッセージにマッチするキーを持つ辞書を渡してください。 エラーメッセージのキーには null , blank , invalid , invalid_choice , unique , unique_for_date があります。以下の Field types セクションで説明する各フィールドには、追加のエラーメッセージキーが指定され ...
https://man.mtool.work/django/6.1/ref/models/fields.html
Django 1.8.9 リリースノート 10005
Django 1.8.9 リリースノート February 1, 2016 Django 1.8.9 fixes several bugs in 1.8.8. バグ修正 Fixed a regression that caused the "user-tools" items to display on the admin's logout page ( #26035 ). Fixed a crash in the translations system ... 0 ). Fixed a regression in 1.8.8 causing incorrect index handling in migrations on PostgreSQL when adding db_index=True or unique=True to a CharField or TextField that already had the other specified, or when removing one of them from a field that had ... both, or when adding unique=True to a field already listed in unique_together ( #26034 ). Fixed a crash when using an __in lookup inside a Case expres ...
https://man.mtool.work/django/6.1/releases/1.8.9.html
モデルの Meta オプション 9447
モデルの Meta オプション このドキュメントでは、モデル内部の class Meta 内でモデルに与えられる、すべての可能な メタデータオプション を説明します。 利用可能な Meta オプション abstract Options. abstract abstract = True の場合、このモデルは 抽象 ... Index ( fields = [ "last_name" , "first_name" ]), models . Index ( fields = [ "first_name" ], name = "first_name_idx" ), ] unique_together Options. unique_together 代わりに UniqueConstraint を constraints オプションとともに使用してください。 UniqueCons ... traint は unique_together よりも多くの機能を提供します。 unique_together は将来廃止される可能性があります。 組み合わせが一意でなければならな ... いフィールドのリストを指定します。 unique_together = [[ "driver" , "restaurant" ]] これは、一緒に考えたときに一意でなければならないリストのリストです。Django の管理 ...
https://man.mtool.work/django/6.1/ref/models/options.html
SchemaEditor 9118
SchemaEditor class BaseDatabaseSchemaEditor [ソース] Django のマイグレーションシステムは2つの部分に分かれています。データベースに対してどのような操作を実行するべきかを計算してその結果を保管するロジックの部分 ( django.db.migrations )と、「モ ... tabaseSchemaEditor. remove_constraint ( model , constraint ) [ソース] model のテーブルから constraint を削除します。 alter_unique_together() BaseDatabaseSchemaEditor. alter_unique_together ( model , old_unique_together , new_unique_together ) [ソース] ... モデルの unique_together 値を変更します。これにより、新しい値に一致するまで、モデルのテーブルからユニーク制約が追加または削除されます。 al ... del , field ) [ソース] モデルのテーブルにフィールドを表すための列(時には複数)を追加します。フィールドに db_index=True や unique=True が設定されている場合、インデックスやユニーク制約も追加されます。 フィールドが through の値なしで ManyToManyField の場 ...
https://man.mtool.work/django/6.1/ref/schema-editor.html
モデルインスタンスリファレンス 8788
モデルインスタンスリファレンス このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおいた方がよいでしょう。 このリファレン ... あります: Validate the model fields - Model.clean_fields() Validate the model as a whole - Model.clean() Validate the field uniqueness - Model.validate_unique() 制約を検証する - Model.validate_constraints() モデルの full_clean() メソッドを使うと、4 つ全 ... , or if you have excluded 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_un ... ique() (if validate_unique is True ), and Model.validate_constraints() (if validate_constraints is True ) in that order and raises a ValidationError ...
https://man.mtool.work/django/6.1/ref/models/instances.html
Django 1.9.2 リリースノート 8459
Django 1.9.2 リリースノート February 1, 2016 Django 1.9.2 fixes a security regression in 1.9 and several bugs in 1.9.1. It also makes a small backwards incompatible change that hopefully doesn't affect any users. Security issue: User with " ... 7 ). Fixed a regression in 1.8.8 causing incorrect index handling in migrations on PostgreSQL when adding db_index=True or unique=True to a CharField or TextField that already had the other specified, or when removing one of them from a field that had ... both, or when adding unique=True to a field already listed in unique_together ( #26034 ). Fixed a regression where defining a relation on an abstract ...
https://man.mtool.work/django/6.1/releases/1.9.2.html
条件式 8359
条件式 Conditional expressions let you use if ... elif ... else logic within filters, annotations, aggregations, and updates. A conditional expression evaluates a series of conditions for each row of a table and returns the matching result ... me" ) >>> # Condition can be created using boolean expressions. >>> from django.db.models import Exists , OuterRef >>> non_unique_account_type = ( ... Client . objects . filter ( ... account_type = OuterRef ( "account_type" ), ... ) ... . exclude ( pk ... = OuterRef ( "pk" )) ... . values ( "pk" ) ... ) >>> When ( Exists ( non_unique_account_type ), then = Value ( "non unique" )) >>> # Condition can be created using lookup expressions. >>> from django.db ... それを直接フィルタで使用できます。つまり、 SELECT カラムには追加されませんが、結果のフィルタリングには使用できます: >>> non_unique_account_type = ( ... Client . objects . filter ( ... account_type = OuterRef ( "account_type" ), ... ) ... . exclude ( pk ...
https://man.mtool.work/django/6.1/ref/models/conditional-expressions.html
モデルからフォームを作成する 8359
モデルからフォームを作成する ModelForm class ModelForm [ソース] データベース中心のアプリケーションを作成している場合、Django モデルに密接にマップするフォームを使うことになるでしょう。例えば、 BlogComment モデルを持っていて、閲覧者がコメント ... m validation step right after the form's clean() method is called. First, the model's full_clean() is called with validate_unique=False and validate_constraints=False , then the model's validate_unique() and validate_constraints() methods are called in ... にアクセスできるようにします。 警告 The ModelForm.clean() method sets flags that make the model validation step validate the uniqueness of model fields that are marked as unique , unique_together or unique_for_date|month|year , as well as constraints. cl ... 方については、 フォームバリデーション ドキュメントを参照してください。 The model's clean() method will be called before any uniqueness or constraint checks are made. See Validating objects for more information on the model's clean() hook. モデルの error ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
LayerMapping データインポートユーティリティ 8244
LayerMapping データインポートユーティリティ LayerMapping クラスは、ベクトル空間データファイル (例: shapefile) の内容を GeoDjango モデルにマッピングする方法を提供します。 このユーティリティは、ベクターレイヤーからジオメトリとフィールドを取り ... , mapping , layer = 0 , source_srs = None , encoding = None , transaction_mode = 'commit_on_success' , transform = True , unique = True , using = 'default' ) [ソース] 以下は LayerMapping オブジェクトのインスタンス生成時に使用できる引数とキーワードです ... ns. In other words, geometries will be inserted into the database unmodified from their original state in the data source. unique Setting this to the name, or a tuple of names, from the given model will create models unique only to the given name(s). G ... eometries from each feature will be added into the collection associated with the unique model. Forces the transaction mode to be 'autocommit' . using 空間データをインポートする際に使用するデータベースを設定しま ...
https://man.mtool.work/django/6.1/ref/contrib/gis/layermapping.html
PREV 1 2 3 4 5 6 7 NEXT