per page, with , order by , clip by
Results of 1 - 10 of about 52 for entries (0.013 sec.)
QuerySet API リファレンス — Django 6.1 ドキュメント 12022
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » QuerySet API リファレンス ¶ このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としてい ... og . objects . annotate ( Count ( "entry" )) # The name of the first blog >>> q [ 0 ] . name 'Blogasaurus' # The number of entries on the first blog >>> q [ 0 ] . entry__count 42 Blog モデル自体は entry__count 属性を定義しませんが、集計式を指定したキーワ ... ード引数を用いることで、集計情報の名前を制御できます: >>> q = Blog . objects . annotate ( number_of_entries = Count ( "entry" )) # The number of entries on the first blog, using the name provided >>> q [ 0 ] . number_of_entries 42 ... 数自体に興味がない場合は、以下のようにできます: >>> from django.db.models import Count >>> blogs = Blog . objects . alias ( entries = Count ( "entry" )) . filter ( entries__gt = 5 ) alias() can be used in conjunction with annotate() , exclude() , filter( ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
QuerySet API リファレンス — Django 6.1 ドキュメント 12022
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » QuerySet API リファレンス ¶ このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としてい ... og . objects . annotate ( Count ( "entry" )) # The name of the first blog >>> q [ 0 ] . name 'Blogasaurus' # The number of entries on the first blog >>> q [ 0 ] . entry__count 42 Blog モデル自体は entry__count 属性を定義しませんが、集計式を指定したキーワ ... ード引数を用いることで、集計情報の名前を制御できます: >>> q = Blog . objects . annotate ( number_of_entries = Count ( "entry" )) # The number of entries on the first blog, using the name provided >>> q [ 0 ] . number_of_entries 42 ... 数自体に興味がない場合は、以下のようにできます: >>> from django.db.models import Count >>> blogs = Blog . objects . alias ( entries = Count ( "entry" )) . filter ( entries__gt = 5 ) alias() can be used in conjunction with annotate() , exclude() , filter( ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
データベースアクセスの最適化 — Django 6.1 ドキュメント 10619
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベースアクセスの最適化 ¶ Djangoのデータベース層は、開発者がデータベースを最大限活用できるように、さまざまな方法を提供しています。このドキュメン ... ts, where possible, use the bulk_update() method to reduce the number of SQL queries. Given a list or queryset of objects: entries = Entry . objects . bulk_create ( [ Entry ( headline = "This is a test" ), Entry ( headline = "This is only a test" ), ] ) ... 以下のような例を考えます: entries [ 0 ] . headline = "This is not a test" entries [ 1 ] . headline = "This is no longer a test" Entry . objects . bulk_updat ... e ( entries , [ "headline" ]) ...これは下記よりも適切です: entries [ 0 ] . headline = "This is not a test" entries [ 0 ] . save () ent ...
https://man.mtool.work/django/6.1/topics/db/optimization.html
データベースアクセスの最適化 — Django 6.1 ドキュメント 10619
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベースアクセスの最適化 ¶ Djangoのデータベース層は、開発者がデータベースを最大限活用できるように、さまざまな方法を提供しています。このドキュメン ... ts, where possible, use the bulk_update() method to reduce the number of SQL queries. Given a list or queryset of objects: entries = Entry . objects . bulk_create ( [ Entry ( headline = "This is a test" ), Entry ( headline = "This is only a test" ), ] ) ... 以下のような例を考えます: entries [ 0 ] . headline = "This is not a test" entries [ 1 ] . headline = "This is no longer a test" Entry . objects . bulk_updat ... e ( entries , [ "headline" ]) ...これは下記よりも適切です: entries [ 0 ] . headline = "This is not a test" entries [ 0 ] . save () ent ...
https://man.mtool.work/django/6.1/topics/db/optimization.html
クエリを作成する — Django 6.1 ドキュメント 10439
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリを作成する ¶ 一度 データモデル を作成すれば、Django はデータオブジェクトの作成、取得、更新および削除を行えるようにデータベースを抽象化した API ... 得する最も簡単な方法は、全てのオブジェクトを取得することです。これを行うには、 Manager の all() メソッドを使います: >>> all_entries = Entry . objects . all () all() メソッドは、データベース内のすべてのオブジェクトを含んだ QuerySet を返します。 フィルタを ... xact クエリ以外でも使えます。好きなクエリ語句を pk と組み合わせて、モデルの主キーに対するクエリを実行できます: # Get blogs entries with id 1, 4 and 7 >>> Blog . objects . filter ( pk__in = [ 1 , 4 , 7 ]) # Get all blog entries with id > 14 >>> Blog . ob ... FOO_set の名前を上書きできます。たとえば、 Entry モデルを blog = ForeignKey(Blog, on_delete=models.CASCADE, related_name='entries') に変更した場合、上記のコード例は次のようになります: >>> b = Blog . objects . get ( id = 1 ) >>> b . entries . all () # R ...
https://man.mtool.work/django/6.1/topics/db/queries.html
クエリを作成する — Django 6.1 ドキュメント 10439
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリを作成する ¶ 一度 データモデル を作成すれば、Django はデータオブジェクトの作成、取得、更新および削除を行えるようにデータベースを抽象化した API ... 得する最も簡単な方法は、全てのオブジェクトを取得することです。これを行うには、 Manager の all() メソッドを使います: >>> all_entries = Entry . objects . all () all() メソッドは、データベース内のすべてのオブジェクトを含んだ QuerySet を返します。 フィルタを ... xact クエリ以外でも使えます。好きなクエリ語句を pk と組み合わせて、モデルの主キーに対するクエリを実行できます: # Get blogs entries with id 1, 4 and 7 >>> Blog . objects . filter ( pk__in = [ 1 , 4 , 7 ]) # Get all blog entries with id > 14 >>> Blog . ob ... FOO_set の名前を上書きできます。たとえば、 Entry モデルを blog = ForeignKey(Blog, on_delete=models.CASCADE, related_name='entries') に変更した場合、上記のコード例は次のようになります: >>> b = Blog . objects . get ( id = 1 ) >>> b . entries . all () # R ...
https://man.mtool.work/django/6.1/topics/db/queries.html
Django のキャッシュフレームワーク — Django 6.1 ドキュメント 9737
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django のキャッシュフレームワーク ¶ 動的なウェブサイトの基本的なトレードオフは、ええと、それが動的であるということです。ユーザーがページをリクエスト ... ON" : "my_cache_table" , } } Unlike other cache backends, the database cache does not support automatic culling of expired entries at the database level. Instead, an expired cache entry is deleted when evaluated by a get() request. Furthermore, expired ... cache entries are culled when add() , set() , or touch() is called and the number of entries exceeds MAX_ENTRIES . キャッシュテーブルを作 ... を実装しているキャッシュバックエンド ( locmem 、 filesystem 、 database バックエンド) では、以下のオプションが有効です: MAX_ENTRIES : 古い値が削除されるまでにキャッシュに保存できる最大エントリ数。この引数のデフォルトは 300 です。 CULL_FREQUENCY : MAX_ENT ...
https://man.mtool.work/django/6.1/topics/cache.html
Django のキャッシュフレームワーク — Django 6.1 ドキュメント 9737
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django のキャッシュフレームワーク ¶ 動的なウェブサイトの基本的なトレードオフは、ええと、それが動的であるということです。ユーザーがページをリクエスト ... ON" : "my_cache_table" , } } Unlike other cache backends, the database cache does not support automatic culling of expired entries at the database level. Instead, an expired cache entry is deleted when evaluated by a get() request. Furthermore, expired ... cache entries are culled when add() , set() , or touch() is called and the number of entries exceeds MAX_ENTRIES . キャッシュテーブルを作 ... を実装しているキャッシュバックエンド ( locmem 、 filesystem 、 database バックエンド) では、以下のオプションが有効です: MAX_ENTRIES : 古い値が削除されるまでにキャッシュに保存できる最大エントリ数。この引数のデフォルトは 300 です。 CULL_FREQUENCY : MAX_ENT ...
https://man.mtool.work/django/6.1/topics/cache.html
モデルインスタンスリファレンス — Django 6.1 ドキュメント 7975
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... o.utils.translation import gettext_lazy as _ class Article ( models . Model ): ... def clean ( self ): # Don't allow draft entries to have a pub_date. if self . status == "draft" and self . pub_date is not None : raise ValidationError ( _ ( "Draft entri ... pub_date フィールドにエラーをアサインします: class Article ( models . Model ): ... def clean ( self ): # Don't allow draft entries to have a pub_date. if self . status == "draft" and self . pub_date is not None : raise ValidationError ( { "pub_date" : _ ... ( "Draft entries may not have a publication date." )} ) ... Model.clean() 実施中に複数フィールドでエラーを発見した場合、ディクショナリを渡し ...
https://man.mtool.work/django/6.1/ref/models/instances.html
モデルインスタンスリファレンス — Django 6.1 ドキュメント 7975
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... o.utils.translation import gettext_lazy as _ class Article ( models . Model ): ... def clean ( self ): # Don't allow draft entries to have a pub_date. if self . status == "draft" and self . pub_date is not None : raise ValidationError ( _ ( "Draft entri ... pub_date フィールドにエラーをアサインします: class Article ( models . Model ): ... def clean ( self ): # Don't allow draft entries to have a pub_date. if self . status == "draft" and self . pub_date is not None : raise ValidationError ( { "pub_date" : _ ... ( "Draft entries may not have a publication date." )} ) ... Model.clean() 実施中に複数フィールドでエラーを発見した場合、ディクショナリを渡し ...
https://man.mtool.work/django/6.1/ref/models/instances.html
PREV 1 2 3 4 5 6 NEXT