per page, with , order by , clip by
Results of 1 - 10 of about 40 for authors (0.015 sec.)
アグリゲーション (集計) — Django 6.1 ドキュメント 13885
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » アグリゲーション (集計) ¶ Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明し ... s . IntegerField () price = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatField () authors = models . ManyToManyField ( Author ) publisher = models . ForeignKey ( Publisher , on_delete = models . CASCADE ) pubdate ... 場合です: # Build an annotated queryset >>> from django.db.models import Count >>> q = Book . objects . annotate ( Count ( "authors" )) # Interrogate the first object in the queryset >>> q [ 0 ] <Book: The Definitive Guide to Django> >>> q [ 0 ] . author ... s__count 2 # Interrogate the second object in the queryset >>> q [ 1 ] <Book: Practical Django Projects> >>> q [ 1 ] . authors__count 1 aggregate() と同様に、アノテーションの名前は集計関数の名前と集計されるフィールドの名前から自動的に生成されます。ア ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
アグリゲーション (集計) — Django 6.1 ドキュメント 13885
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » アグリゲーション (集計) ¶ Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明し ... s . IntegerField () price = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatField () authors = models . ManyToManyField ( Author ) publisher = models . ForeignKey ( Publisher , on_delete = models . CASCADE ) pubdate ... 場合です: # Build an annotated queryset >>> from django.db.models import Count >>> q = Book . objects . annotate ( Count ( "authors" )) # Interrogate the first object in the queryset >>> q [ 0 ] <Book: The Definitive Guide to Django> >>> q [ 0 ] . author ... s__count 2 # Interrogate the second object in the queryset >>> q [ 1 ] <Book: Practical Django Projects> >>> q [ 1 ] . authors__count 1 aggregate() と同様に、アノテーションの名前は集計関数の名前と集計されるフィールドの名前から自動的に生成されます。ア ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
クエリを作成する — Django 6.1 ドキュメント 9314
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリを作成する ¶ 一度 データモデル を作成すれば、Django はデータオブジェクトの作成、取得、更新および削除を行えるようにデータベースを抽象化した API ... ody_text = models . TextField () pub_date = models . DateField () mod_date = models . DateField ( default = date . today ) authors = models . ManyToManyField ( Author ) number_of_comments = models . IntegerField ( default = 0 ) number_of_pingbacks = mod ... ェクトに追加しています: >>> from blog.models import Author >>> joe = Author . objects . create ( name = "Joe" ) >>> entry . authors . add ( joe ) 複数のレコードを ManyToManyField に一気に追加するには、 add() の呼び出しに複数の引数を含めてください: >>> jo ... eorge = Author . objects . create ( name = "George" ) >>> ringo = Author . objects . create ( name = "Ringo" ) >>> entry . authors . add ( john , paul , george , ringo ) もし間違った型のオブジェクトを設定もしくは追加しようとすれば Django はエラーを発生さ ...
https://man.mtool.work/django/6.1/topics/db/queries.html
クエリを作成する — Django 6.1 ドキュメント 9314
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリを作成する ¶ 一度 データモデル を作成すれば、Django はデータオブジェクトの作成、取得、更新および削除を行えるようにデータベースを抽象化した API ... ody_text = models . TextField () pub_date = models . DateField () mod_date = models . DateField ( default = date . today ) authors = models . ManyToManyField ( Author ) number_of_comments = models . IntegerField ( default = 0 ) number_of_pingbacks = mod ... ェクトに追加しています: >>> from blog.models import Author >>> joe = Author . objects . create ( name = "Joe" ) >>> entry . authors . add ( joe ) 複数のレコードを ManyToManyField に一気に追加するには、 add() の呼び出しに複数の引数を含めてください: >>> jo ... eorge = Author . objects . create ( name = "George" ) >>> ringo = Author . objects . create ( name = "Ringo" ) >>> entry . authors . add ( john , paul , george , ringo ) もし間違った型のオブジェクトを設定もしくは追加しようとすれば Django はエラーを発生さ ...
https://man.mtool.work/django/6.1/topics/db/queries.html
QuerySet API リファレンス — Django 6.1 ドキュメント 8830
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » QuerySet API リファレンス ¶ このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としてい ... 値を先の values() 句に追加してください。例えば: >>> from django.db.models import Count >>> Blog . objects . values ( "entry__authors" , entries = Count ( "entry" )) <QuerySet [{'entry__authors': 1, 'entries': 20}, {'entry__authors': 1, 'entries': 13}]> >> ... > Blog . objects . values ( "entry__authors" ) . annotate ( entries = Count ( "entry" )) <QuerySet [{'entry__authors': 1, 'entries': 33}]> いくつかの際どいポイントにつ ... om django.db.models.functions import Lower >>> CharField . register_lookup ( Lower ) >>> Blog . objects . values ( "entry__authors__name__lower" ) . annotate ( entries = Count ( "entry" )) <QuerySet [{'entry__authors__name__lower': 'test author', 'entri ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
QuerySet API リファレンス — Django 6.1 ドキュメント 8830
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » QuerySet API リファレンス ¶ このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としてい ... 値を先の values() 句に追加してください。例えば: >>> from django.db.models import Count >>> Blog . objects . values ( "entry__authors" , entries = Count ( "entry" )) <QuerySet [{'entry__authors': 1, 'entries': 20}, {'entry__authors': 1, 'entries': 13}]> >> ... > Blog . objects . values ( "entry__authors" ) . annotate ( entries = Count ( "entry" )) <QuerySet [{'entry__authors': 1, 'entries': 33}]> いくつかの際どいポイントにつ ... om django.db.models.functions import Lower >>> CharField . register_lookup ( Lower ) >>> Blog . objects . values ( "entry__authors__name__lower" ) . annotate ( entries = Count ( "entry" )) <QuerySet [{'entry__authors__name__lower': 'test author', 'entri ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
マネージャ — Django 6.1 ドキュメント 8518
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » マネージャ ¶ class Manager [ソース] ¶ マネージャ (Manager) とは、Django のモデルに対するデータベースクエリの操作を提供するインターフェイスです。Djan ... odels . CharField ( max_length = 1 , choices = { "A" : _ ( "Author" ), "E" : _ ( "Editor" )}) people = models . Manager () authors = AuthorManager () editors = EditorManager () この例では、 Person.authors.all() 、 Person.editors.all() 、 Person.people.a ... カスタムの QuerySet で定義したメソッドは Manager でも実装する必要があります: class PersonQuerySet ( models . QuerySet ): def authors ( self ): return self . filter ( role = "A" ) def editors ( self ): return self . filter ( role = "E" ) class PersonManage ... r ( models . Manager ): def get_queryset ( self ): return PersonQuerySet ( self . model , using = self . _db ) def authors ( self ): return self . get_queryset () . authors () def editors ( self ): return self . get_queryset () . editors () clas ...
https://man.mtool.work/django/6.1/topics/db/managers.html
Django テンプレート言語 — Django 6.1 ドキュメント 8347
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django テンプレート言語 ¶ このドキュメントはDjangoテンプレートシステムの文法を説明しています。もしあなたがもっと技術者的な観点でどう動かすかやどう拡 ... ping to avoid repetition and maintain consistent output. Basic syntax ¶ A partial can be defined using the partialdef tag: authors.html ¶ {% partialdef user-info %} < div id = "user-info- {{ user.username }} " > < h3 > {{ user.name }} </ h3 > < p > {{ u ... rendered using the partial tag: {% partial user-info %} Fragment reuse ¶ A template fragment can be reused multiple times: authors.html ¶ {% block content %} < h2 > Authors </ h2 > {% for user in authors %} {% partial user-info %} {% endfor %} < h2 > Ed ... % endpartialdef %} {# Other page content here. #} {# Reuse later elsewhere in the template. #} < section class = "featured-authors" > < h2 > Featured Authors </ h2 > {% for user in featured %} {% partial user-info %} {% endfor %} </ section > Accessing ...
https://man.mtool.work/django/6.1/ref/templates/language.html
Django テンプレート言語 — Django 6.1 ドキュメント 8347
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django テンプレート言語 ¶ このドキュメントはDjangoテンプレートシステムの文法を説明しています。もしあなたがもっと技術者的な観点でどう動かすかやどう拡 ... ping to avoid repetition and maintain consistent output. Basic syntax ¶ A partial can be defined using the partialdef tag: authors.html ¶ {% partialdef user-info %} < div id = "user-info- {{ user.username }} " > < h3 > {{ user.name }} </ h3 > < p > {{ u ... rendered using the partial tag: {% partial user-info %} Fragment reuse ¶ A template fragment can be reused multiple times: authors.html ¶ {% block content %} < h2 > Authors </ h2 > {% for user in authors %} {% partial user-info %} {% endfor %} < h2 > Ed ... % endpartialdef %} {# Other page content here. #} {# Reuse later elsewhere in the template. #} < section class = "featured-authors" > < h2 > Featured Authors </ h2 > {% for user in featured %} {% partial user-info %} {% endfor %} </ section > Accessing ...
https://man.mtool.work/django/6.1/ref/templates/language.html
マネージャ — Django 6.1 ドキュメント 8269
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » マネージャ ¶ class Manager [ソース] ¶ マネージャ (Manager) とは、Django のモデルに対するデータベースクエリの操作を提供するインターフェイスです。Djan ... odels . CharField ( max_length = 1 , choices = { "A" : _ ( "Author" ), "E" : _ ( "Editor" )}) people = models . Manager () authors = AuthorManager () editors = EditorManager () この例では、 Person.authors.all() 、 Person.editors.all() 、 Person.people.a ... カスタムの QuerySet で定義したメソッドは Manager でも実装する必要があります: class PersonQuerySet ( models . QuerySet ): def authors ( self ): return self . filter ( role = "A" ) def editors ( self ): return self . filter ( role = "E" ) class PersonManage ... r ( models . Manager ): def get_queryset ( self ): return PersonQuerySet ( self . model , using = self . _db ) def authors ( self ): return self . get_queryset () . authors () def editors ( self ): return self . get_queryset () . editors () clas ...
https://man.mtool.work/django/6.1/topics/db/managers.html
PREV 1 2 3 4 NEXT