per page, with , order by , clip by
Results of 1 - 4 of about 4 for publications (0.002 sec.)
多対多 (many-to-many) 関係 — Django 6.1 ドキュメント 11077
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対多 (many-to-many) 関係 ¶ 多対多の関係を定義するには、 ManyToManyField を使用します。 この例では、一つの Article は複数の Publication オブジェクト ... __str__ ( self ): return self . title class Article ( models . Model ): headline = models . CharField ( max_length = 100 ) publications = models . ManyToManyField ( Publication ) class Meta : ordering = [ "headline" ] def __str__ ( self ): return self . head ... e ( headline = "Django lets you build web apps easily" ) 保存するまでは Publication と関連付けることはできません: >>> a1 . publications . add ( p1 ) Traceback (most recent call last): ... ValueError : "<Article: Django lets you build web apps easily>" needs ... is many-to-many relationship can be used. 保存しましょう! >>> a1 . save () Article と Publication を関連付けます: >>> a1 . publications . add ( p1 ) Article をもう一つ作り、それが publications に表示されるようセットします: >>> a2 = Article ( headline = "NASA ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_many.html
多対多 (many-to-many) 関係 — Django 6.1 ドキュメント 11077
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対多 (many-to-many) 関係 ¶ 多対多の関係を定義するには、 ManyToManyField を使用します。 この例では、一つの Article は複数の Publication オブジェクト ... __str__ ( self ): return self . title class Article ( models . Model ): headline = models . CharField ( max_length = 100 ) publications = models . ManyToManyField ( Publication ) class Meta : ordering = [ "headline" ] def __str__ ( self ): return self . head ... e ( headline = "Django lets you build web apps easily" ) 保存するまでは Publication と関連付けることはできません: >>> a1 . publications . add ( p1 ) Traceback (most recent call last): ... ValueError : "<Article: Django lets you build web apps easily>" needs ... is many-to-many relationship can be used. 保存しましょう! >>> a1 . save () Article と Publication を関連付けます: >>> a1 . publications . add ( p1 ) Article をもう一つ作り、それが publications に表示されるようセットします: >>> a2 = Article ( headline = "NASA ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_many.html
PostgreSQL 固有の集計関数 — Django 6.1 ドキュメント 7397
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » PostgreSQL 固有の集計関数 ¶ これらの機能は、 django.contrib.postgres.aggregates モジュールから利用可能です。これらについての詳細は、 PostgreSQLドキュ ... odels . CharField ( max_length = 30 ) class Article ( models . Model ): headline = models . CharField ( max_length = 100 ) publications = models . ManyToManyField ( Publication ) >>> article = Article . objects . create ( headline = "NASA uses Python" ) >>> ... article . publications . create ( title = "The Python Journal" ) <Publication: Publication object (1)> >>> article . publications . create ( titl ... o.contrib.postgres.aggregates import StringAgg >>> Article . objects . annotate ( ... publication_names = StringAgg ( ... "publications__title" , ... delimiter = ", " , ... order_by = "publications__title" , ... ) ... ) . values ( "headline" , "publication_n ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/aggregates.html
PostgreSQL 固有の集計関数 — Django 6.1 ドキュメント 7378
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » PostgreSQL 固有の集計関数 ¶ これらの機能は、 django.contrib.postgres.aggregates モジュールから利用可能です。これらについての詳細は、 PostgreSQLドキュ ... odels . CharField ( max_length = 30 ) class Article ( models . Model ): headline = models . CharField ( max_length = 100 ) publications = models . ManyToManyField ( Publication ) >>> article = Article . objects . create ( headline = "NASA uses Python" ) >>> ... article . publications . create ( title = "The Python Journal" ) <Publication: Publication object (1)> >>> article . publications . create ( titl ... o.contrib.postgres.aggregates import StringAgg >>> Article . objects . annotate ( ... publication_names = StringAgg ( ... "publications__title" , ... delimiter = ", " , ... order_by = "publications__title" , ... ) ... ) . values ( "headline" , "publication_n ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/aggregates.html
PREV 1 NEXT