per page, with , order by , clip by
Results of 1 - 10 of about 12 for rating (0.011 sec.)
アグリゲーション (集計) — Django 6.1 ドキュメント 12788
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » アグリゲーション (集計) ¶ Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明し ... max_length = 300 ) pages = models . IntegerField () price = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatField () authors = models . ManyToManyField ( Author ) publisher = models . ForeignKey ( Publisher , on_de ... ss>, <Publisher: SalamiPress>, ...]> >>> pubs [ 0 ] . num_books 73 # Each publisher, with a separate count of books with a rating above and below 5 >>> from django.db.models import Q >>> above_5 = Count ( "book" , filter = Q ( book__rating__gt = 5 )) > ... >> below_5 = Count ( "book" , filter = Q ( book__rating__lte = 5 )) >>> pubs = Publisher . objects . annotate ( below_5 = below_5 ) . annotate ( above_5 = above_5 ) >>> pubs [ 0 ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
アグリゲーション (集計) — Django 6.1 ドキュメント 12593
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » アグリゲーション (集計) ¶ Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明し ... max_length = 300 ) pages = models . IntegerField () price = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatField () authors = models . ManyToManyField ( Author ) publisher = models . ForeignKey ( Publisher , on_de ... ss>, <Publisher: SalamiPress>, ...]> >>> pubs [ 0 ] . num_books 73 # Each publisher, with a separate count of books with a rating above and below 5 >>> from django.db.models import Q >>> above_5 = Count ( "book" , filter = Q ( book__rating__gt = 5 )) > ... >> below_5 = Count ( "book" , filter = Q ( book__rating__lte = 5 )) >>> pubs = Publisher . objects . annotate ( below_5 = below_5 ) . annotate ( above_5 = above_5 ) >>> pubs [ 0 ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 8896
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... ングでアノテーションを付ける場合: >>> from django.db.models import Avg , F , Window >>> Movie . objects . annotate ( ... avg_rating = Window ( ... expression = Avg ( "rating" ), ... partition_by = [ F ( "studio" ), F ( "genre" )], ... order_by = "release ... by" : [ F ( "studio" ), F ( "genre" )], ... "order_by" : "released__year" , ... } >>> Movie . objects . annotate ( ... avg_rating = Window ( ... expression = Avg ( "rating" ), ... ** window , ... ), ... best = Window ( ... expression = Max ( "rating" ) ... , ... ** window , ... ), ... worst = Window ( ... expression = Min ( "rating" ), ... ** window , ... ), ... ) ウィンドウ関数に対するフィルタリングは、ルックアップが分離型でない(コネクタとして OR や ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 8896
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... ングでアノテーションを付ける場合: >>> from django.db.models import Avg , F , Window >>> Movie . objects . annotate ( ... avg_rating = Window ( ... expression = Avg ( "rating" ), ... partition_by = [ F ( "studio" ), F ( "genre" )], ... order_by = "release ... by" : [ F ( "studio" ), F ( "genre" )], ... "order_by" : "released__year" , ... } >>> Movie . objects . annotate ( ... avg_rating = Window ( ... expression = Avg ( "rating" ), ... ** window , ... ), ... best = Window ( ... expression = Max ( "rating" ) ... , ... ** window , ... ), ... worst = Window ( ... expression = Min ( "rating" ), ... ** window , ... ), ... ) ウィンドウ関数に対するフィルタリングは、ルックアップが分離型でない(コネクタとして OR や ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
クエリを作成する — Django 6.1 ドキュメント 8101
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリを作成する ¶ 一度 データモデル を作成すれば、Django はデータオブジェクトの作成、取得、更新および削除を行えるようにデータベースを抽象化した API ... r ) number_of_comments = models . IntegerField ( default = 0 ) number_of_pingbacks = models . IntegerField ( default = 0 ) rating = models . IntegerField ( default = 5 ) def __str__ ( self ): return self . headline オブジェクトを作成する ¶ Djangoでは、 ... ク数とコメント数の合計より少ないエントリーをすべて見つけるには、次のようなクエリを発行します: >>> Entry . objects . filter ( rating__lt = F ( "number_of_comments" ) + F ( "number_of_pingbacks" )) F() オブジェクトのリレーションシップに 2重アンダースコア表 ... m django.db.models import OuterRef , Subquery , Sum >>> Entry . objects . values ( "pub_date__year" ) . annotate ( ... top_rating = Subquery ( ... Entry . objects . filter ( ... pub_date__year = OuterRef ( "pub_date__year" ), ... ) ... . order_by ( "-r ...
https://man.mtool.work/django/6.1/topics/db/queries.html
クエリを作成する — Django 6.1 ドキュメント 8101
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリを作成する ¶ 一度 データモデル を作成すれば、Django はデータオブジェクトの作成、取得、更新および削除を行えるようにデータベースを抽象化した API ... r ) number_of_comments = models . IntegerField ( default = 0 ) number_of_pingbacks = models . IntegerField ( default = 0 ) rating = models . IntegerField ( default = 5 ) def __str__ ( self ): return self . headline オブジェクトを作成する ¶ Djangoでは、 ... ク数とコメント数の合計より少ないエントリーをすべて見つけるには、次のようなクエリを発行します: >>> Entry . objects . filter ( rating__lt = F ( "number_of_comments" ) + F ( "number_of_pingbacks" )) F() オブジェクトのリレーションシップに 2重アンダースコア表 ... m django.db.models import OuterRef , Subquery , Sum >>> Entry . objects . values ( "pub_date__year" ) . annotate ( ... top_rating = Subquery ( ... Entry . objects . filter ( ... pub_date__year = OuterRef ( "pub_date__year" ), ... ) ... . order_by ( "-r ...
https://man.mtool.work/django/6.1/topics/db/queries.html
モデルインスタンスリファレンス — Django 6.1 ドキュメント 7853
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... estaurant ( pk = 1 , name = "Bob's Cafe" ) . save ( force_insert = ( Place ,)) Restaurant ( pk = 1 , name = "Bob's Cafe" , rating = 4 ) . save ( force_insert = ( Place , Rating )) force_insert=(models.Model,) を渡すことで、すべての親モデルに対して INSE ...
https://man.mtool.work/django/6.1/ref/models/instances.html
モデルインスタンスリファレンス — Django 6.1 ドキュメント 7853
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... estaurant ( pk = 1 , name = "Bob's Cafe" ) . save ( force_insert = ( Place ,)) Restaurant ( pk = 1 , name = "Bob's Cafe" , rating = 4 ) . save ( force_insert = ( Place , Rating )) force_insert=(models.Model,) を渡すことで、すべての親モデルに対して INSE ...
https://man.mtool.work/django/6.1/ref/models/instances.html
QuerySet API リファレンス — Django 6.1 ドキュメント 7729
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » QuerySet API リファレンス ¶ このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としてい ... を遅延読み込みリストに追加します: # Defers both the body and headline fields. Entry . objects . defer ( "body" ) . filter ( rating = 5 ) . defer ( "headline" ) フィールドが遅延読み込みリストに追加される順番は重要ではありません。すでに遅延読み込みに指定さ ... ィールドだけが考慮されることになります: # This will defer all fields except the headline. Entry . objects . only ( "body" , "rating" ) . only ( "headline" ) defer() は段階的に(遅延読み込みリストにフィールドを追加しながら)動作するので、 only() と defer( ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
マイグレーション — Django 6.1 ドキュメント 7729
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » マイグレーション ¶ マイグレーション (Migrations) は、Django でモデルに対して行った変更 (フィールドの追加やモデルの削除など) をデータベーススキーマに ... migrations" , "0001_initial" )] operations = [ migrations . DeleteModel ( "Tribble" ), migrations . AddField ( "Author" , "rating" , models . IntegerField ( default = 0 )), ] Django が (Python モジュールとして) マイグレーションファイルを読み込んだ時に最 ...
https://man.mtool.work/django/6.1/topics/migrations.html
PREV 1 2 NEXT