per page, with , order by , clip by
Results of 1 - 10 of about 29 for condition (0.002 sec.)
制約 (Constraint) リファレンス 14569
制約 (Constraint) リファレンス このモジュールで定義されたクラスはデータベース制約を作成します。これらはモデルの Meta.constraints オプションで追加されます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されています ... ss)s' を含めることができ、これにより小文字化されたアプリラベルと具体モデルのクラス名に置き換えられます。 CheckConstraint ( condition = Q ( age__gte = 18 ), name = " %(app_label)s _ %(class)s _is_adult" ) 制約のバリデーション 制約は モデルのバリデーション ... ationError を発生させます。 このメソッドはサブクラスで実装する必要があります。 CheckConstraint class CheckConstraint ( * , condition , name , violation_error_code = None , violation_error_message = None ) [ソース] データベースにチェック制約を作成します。 ... condition CheckConstraint. condition 制約が強制する条件チェックを指定する Q オブジェクトまたは真偽値の Expression です。 例: CheckConstraint ( condition = Q ( ...
https://man.mtool.work/django/6.1/ref/models/constraints.html
条件付きのビュー処理 12073
条件付きのビュー処理 HTTP クライアントは、さまざまな HTTPヘッダーを送信することで、受信したリソースについてサーバーに伝えることができます。この方法は、ウェブページを ( GET メソッドを利用して) 取得する際に、すでにクライアントが取得しているデ ... -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 リクエストのヘッダがリソースのヘッダと一致するかどうかを調べ ...
https://man.mtool.work/django/6.1/topics/conditional-view-processing.html
PostgreSQL 固有のデータベース制約 10556
PostgreSQL 固有のデータベース制約 PostgreSQL は django.contrib.postgres.constraints モジュールから利用できる追加のデータ整合性制約をサポートしています。これらはモデル Meta.constraints オプションで追加されます。 ExclusionConstraint class Exc ... lusionConstraint ( * , 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=False ... ) 。 これらの条件は、 django.db.models.Index.condition と同じデータベースの制約事項を持ちます。 deferrable ExclusionConstraint. deferrable 遅延可能な排他制約を作成するには、この ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/constraints.html
モデル index リファレンス 9561
モデル index リファレンス Index クラスを利用すると、データベースのインデックスの作成が簡単になります。インデックスは、 Meta.indexes オプションを使用して追加できます。このドキュメントでは、 index options を含む Index の API リファレンスを説明 ... 習です。 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 が必要です ...
https://man.mtool.work/django/6.1/ref/models/indexes.html
条件式 9055
条件式 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 ... expression. Conditional expressions can also be combined and nested like other expressions . 条件式クラス このページの例では、以下のモデルを使用 ... ount_type = models . CharField ( max_length = 1 , choices = ACCOUNT_TYPE_CHOICES , default = REGULAR , ) When class When ( condition = None , then = None , ** lookups ) [ソース] When() オブジェクトは、条件式で使用する条件とその結果をカプセル化するために使 ... LD , then = "name" ) >>> When ( account_type = Client . GOLD , then = F ( "name" )) >>> # You can use field lookups in the condition >>> from datetime import date >>> When ( ... registered_on__gt = date ( 2014 , 1 , 1 ), ... registered_on__lt = date ( 201 ...
https://man.mtool.work/django/6.1/ref/models/conditional-expressions.html
Django 2.2.1 リリースノート 8728
Django 2.2.1 リリースノート May 1, 2019 Django 2.2.1 fixes several bugs in 2.2. バグ修正 Fixed a regression in Django 2.1 that caused the incorrect quoting of database user password when using dbshell on Oracle ( #30307 ). Added compatibili ... 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 ). ...
https://man.mtool.work/django/6.1/releases/2.2.1.html
Django 1.9.5 リリースノート 8059
Django 1.9.5 リリースノート April 1, 2016 Django 1.9.5 では、1.9.4 にあったいくつかのバグを修正しました。 バグ修正 Made MultiPartParser ignore filenames that normalize to an empty string to fix crash in MemoryFileUploadHandler on specially ... crafted user input ( #26325 ). Fixed a race condition in BaseCache.get_or_set() ( #26332 ). It now returns the default value instead of False if there's an error when trying to ...
https://man.mtool.work/django/6.1/releases/1.9.5.html
カスタムのモデルフィールドを作成する 7880
カスタムのモデルフィールドを作成する はじめに モデルリファレンス ドキュメントでは、Djangoの標準フィールドクラスである、 CharField や、 DateField などの使い方を説明しています。多くの場合、これらのクラスがあれば十分です。ただし、Djangoのバージ ... s HandField ( models . Field ): # ... def formfield ( self , ** kwargs ): # Exclude the field from the ModelForm when some condition is met. some_condition = kwargs . get ( "some_condition" , False ) if some_condition : return None # Set up some defaults ...
https://man.mtool.work/django/6.1/howto/custom-model-fields.html
Django 3.2.1 リリースノート 7880
Django 3.2.1 リリースノート May 4, 2021 Django 3.2.1 fixes a security issue and several bugs in 3.2. CVE-2021-31542: Potential directory-traversal via uploaded files MultiPartParser , UploadedFile , and FieldFile allowed directory-traversal ... go 3.2 where a system check would crash on a reverse one-to-one relationships in CheckConstraint.check or UniqueConstraint.condition ( #32635 ). Fixed a regression in Django 3.2 that caused a crash of ModelAdmin.search_fields when searching against phrase ...
https://man.mtool.work/django/6.1/releases/3.2.1.html
ビューのデコレータ 7635
ビューのデコレータ Djangoでは、さまざまなHTTP機能をサポートするために、ビューに適用できるいくつかのデコレータが提供されています。 ここで紹介するデコレータをクラスベースのビューで使用する方法については、 クラスをデコレーションする を参照して ... 件付きのビュー処理 django.views.decorators.http にある以下のデコレータを使って、特定のビューのキャッシュ動作を制御できます。 condition ( etag_func = None , last_modified_func = None ) [ソース] conditional_page () このデコレータを使用すると、ビューに Conditi ...
https://man.mtool.work/django/6.1/topics/http/decorators.html
PREV 1 2 3 NEXT