per page, with , order by , clip by
Results of 1 - 10 of about 18 for Publication (0.005 sec.)
多対多 (many-to-many) 関係 — Django 6.1 ドキュメント 13332
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対多 (many-to-many) 関係 ¶ 多対多の関係を定義するには、 ManyToManyField を使用します。 この例では、一つの Article は複数の Publication オブジェクト ... に掲載することができ、一つの Publication は複数の Article オブジェクトを持ちます: from django.db import models class Publication ( models . Model ): title = models ... __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 . hea ... dline 以下は、Python API の機能を使って実行できる操作の例です。 Publication インスタンスをいくつか作ります: >>> p1 = Publication ( title = "The Python Journal" ) >>> p1 . save () >>> p2 = Publicatio ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_many.html
多対多 (many-to-many) 関係 — Django 6.1 ドキュメント 13297
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対多 (many-to-many) 関係 ¶ 多対多の関係を定義するには、 ManyToManyField を使用します。 この例では、一つの Article は複数の Publication オブジェクト ... に掲載することができ、一つの Publication は複数の Article オブジェクトを持ちます: from django.db import models class Publication ( models . Model ): title = models ... __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 . hea ... dline 以下は、Python API の機能を使って実行できる操作の例です。 Publication インスタンスをいくつか作ります: >>> p1 = Publication ( title = "The Python Journal" ) >>> p1 . save () >>> p2 = Publicatio ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_many.html
PostgreSQL 固有の集計関数 — Django 6.1 ドキュメント 9008
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » PostgreSQL 固有の集計関数 ¶ これらの機能は、 django.contrib.postgres.aggregates モジュールから利用可能です。これらについての詳細は、 PostgreSQLドキュ ... の順序を指定する式 (または文字列や式のタプルやリスト) のオプションの文字列。 ArrayAgg.order_by と同じ例です。 使用例: class Publication ( models . Model ): title = models . CharField ( max_length = 30 ) class Article ( models . Model ): headline = models . C ... harField ( 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 ( tit ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/aggregates.html
PostgreSQL 固有の集計関数 — Django 6.1 ドキュメント 8853
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » PostgreSQL 固有の集計関数 ¶ これらの機能は、 django.contrib.postgres.aggregates モジュールから利用可能です。これらについての詳細は、 PostgreSQLドキュ ... の順序を指定する式 (または文字列や式のタプルやリスト) のオプションの文字列。 ArrayAgg.order_by と同じ例です。 使用例: class Publication ( models . Model ): title = models . CharField ( max_length = 30 ) class Article ( models . Model ): headline = models . C ... harField ( 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 ( tit ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/aggregates.html
サイトマップ・フレームワーク — Django 6.1 ドキュメント 8115
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » サイトマップ・フレームワーク ¶ Djangoには、 sitemap XML ファイルを作成するための高レベルなサイトマップ生成フレームワークが付属しています。 概要 ¶ サ ... ustomization of the templates, such as Google news sitemaps . Assuming Sitemap's items() would return a list of items with publication_data and a tags field something like this would generate a Google News compatible sitemap: <?xml version="1.0" encoding="U ... gefreq> {% endif %} {% if url.priority %} <priority> {{ url.priority }} </priority> {% endif %} <news:news> {% if url.item.publication_date %} <news:publication_date> {{ url.item.publication_date | date :"Y-m-d" }} </news:publication_date> {% endif %} {% if ...
https://man.mtool.work/django/6.1/ref/contrib/sitemaps.html
サイトマップ・フレームワーク — Django 6.1 ドキュメント 8115
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » サイトマップ・フレームワーク ¶ Djangoには、 sitemap XML ファイルを作成するための高レベルなサイトマップ生成フレームワークが付属しています。 概要 ¶ サ ... ustomization of the templates, such as Google news sitemaps . Assuming Sitemap's items() would return a list of items with publication_data and a tags field something like this would generate a Google News compatible sitemap: <?xml version="1.0" encoding="U ... gefreq> {% endif %} {% if url.priority %} <priority> {{ url.priority }} </priority> {% endif %} <news:news> {% if url.item.publication_date %} <news:publication_date> {{ url.item.publication_date | date :"Y-m-d" }} </news:publication_date> {% endif %} {% if ...
https://man.mtool.work/django/6.1/ref/contrib/sitemaps.html
クラスベースビュー — Django 6.1 ドキュメント 7927
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クラスベースビュー ¶ ビューとは、リクエストを受け取り、レスポンスを返す呼び出し可能オブジェクトです。ビューは単なる関数以上のものにもなり得ます。Dja ... ListView ( ListView ): model = Book def head ( self , * args , ** kwargs ): last_book = self . get_queryset () . latest ( "publication_date" ) response = HttpResponse ( # RFC 1123 date format. headers = { "Last-Modified" : last_book . publication_date . str ...
https://man.mtool.work/django/6.1/topics/class-based-views/
クラスベースビュー — Django 6.1 ドキュメント 7927
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クラスベースビュー ¶ ビューとは、リクエストを受け取り、レスポンスを返す呼び出し可能オブジェクトです。ビューは単なる関数以上のものにもなり得ます。Dja ... ListView ( ListView ): model = Book def head ( self , * args , ** kwargs ): last_book = self . get_queryset () . latest ( "publication_date" ) response = HttpResponse ( # RFC 1123 date format. headers = { "Last-Modified" : last_book . publication_date . str ...
https://man.mtool.work/django/6.1/topics/class-based-views/
モデルインスタンスリファレンス — Django 6.1 ドキュメント 7892
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... e. if self . status == "draft" and self . pub_date is not None : raise ValidationError ( _ ( "Draft entries may not have a publication date." )) # Set the pub_date for published items if it hasn't been set already. if self . status == "published" and self . ... atus == "draft" and self . pub_date is not None : raise ValidationError ( { "pub_date" : _ ( "Draft entries may not have a publication date." )} ) ... Model.clean() 実施中に複数フィールドでエラーを発見した場合、ディクショナリを渡してエラーにフィールド名をマ ... lf . pub_date is not None : if exclude and "status" in exclude : raise ValidationError ( _ ( "Draft entries may not have a publication date." ) ) else : raise ValidationError ( { "status" : _ ( "Set status to draft if there is not a publication date." ), } ...
https://man.mtool.work/django/6.1/ref/models/instances.html
モデルインスタンスリファレンス — Django 6.1 ドキュメント 7892
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... e. if self . status == "draft" and self . pub_date is not None : raise ValidationError ( _ ( "Draft entries may not have a publication date." )) # Set the pub_date for published items if it hasn't been set already. if self . status == "published" and self . ... atus == "draft" and self . pub_date is not None : raise ValidationError ( { "pub_date" : _ ( "Draft entries may not have a publication date." )} ) ... Model.clean() 実施中に複数フィールドでエラーを発見した場合、ディクショナリを渡してエラーにフィールド名をマ ... lf . pub_date is not None : if exclude and "status" in exclude : raise ValidationError ( _ ( "Draft entries may not have a publication date." ) ) else : raise ValidationError ( { "status" : _ ( "Set status to draft if there is not a publication date." ), } ...
https://man.mtool.work/django/6.1/ref/models/instances.html
PREV 1 2 NEXT