per page, with , order by , clip by
Results of 1 - 9 of about 9 for Publication (0.004 sec.)
多対多 (many-to-many) 関係 13948
多対多 (many-to-many) 関係 多対多の関係を定義するには、 ManyToManyField を使用します。 この例では、一つの Article は複数の Publication オブジェクトに掲載することができ、一つの Publication は複数の Article オブジェクトを持ちます: from django ... .db import models class Publication ( models . Model ): title = models . CharField ( max_length = 30 ) class Meta : ordering = [ "title" ] def __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 固有の集計関数 9329
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
サイトマップ・フレームワーク 8538
サイトマップ・フレームワーク 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
クラスベースビュー 8304
クラスベースビュー ビューとは、リクエストを受け取り、レスポンスを返す呼び出し可能オブジェクトです。ビューは単なる関数以上のものにもなり得ます。Django ではビューとして使用できるいくつかのクラスを提供しており、これらを利用することで、ビューを ... 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/
モデルインスタンスリファレンス 8268
モデルインスタンスリファレンス このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおいた方がよいでしょう。 このリファレン ... 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
組み込みのクラスベースのジェネリックビュー(汎用ビュー) 8178
組み込みのクラスベースのジェネリックビュー(汎用ビュー) ウェブアプリケーションを書くのは、特定のパターンを何度も繰り返すことになるため、単調になりがちです。Django はモデルとテンプレート層で単調さを取り除くことを試みてきましたが、ウェブ開発 ... thors = models . ManyToManyField ( "Author" ) publisher = models . ForeignKey ( Publisher , on_delete = models . CASCADE ) publication_date = models . DateField () 次に、ビューを定義しましょう。 # views.py from django.views.generic import ListView from book ... ic import ListView from books.models import Book class BookListView ( ListView ): queryset = Book . objects . order_by ( "-publication_date" ) context_object_name = "book_list" これは小さな例ですが、queryset の概念は上手く表現できていると思います。普通はただ ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-display.html
FAQ: 一般的な質問 8070
FAQ: 一般的な質問 Django というプロジェクトが作られた経緯を教えてください。 Djangoは、非常に実用的なニーズから成長しました。新聞のWebオペレーションであるWorld Onlineは、ジャーナリズムの締め切りに集中的なWebアプリケーションを構築する責任があ ... tps://www.djangoproject.com/ を使用してください。 名称が必要なら、何も加えずただ "Django" を使ってください。 If you need a publication date, use the year of release of the version you're referencing (e.g., 2013 for v1.5). Django のリソースはどこに行けばもっ ...
https://man.mtool.work/django/6.1/faq/general.html
How to release Django 8070
How to release Django このドキュメントでは、Django のリリース方法について説明しています。 これらの手順を変更した場合は、最新の情報を保ってください! ここでのポイントは、規定を設けるのではなく、説明的であることです。自由に効率化したり、変更し ... ng, use the checklists app in the project admin . This populates a lot of boilerplate you will need for announcements, CVE publication, and hashes for commit messages. By using this app for preparing security issue metadata, your peer releasers can check yo ...
https://man.mtool.work/django/6.1/internals/howto-release-django.html
はじめての Django アプリ作成、その 7 8070
はじめての Django アプリ作成、その 7 このチュートリアルは チュートリアル その6 の続きです。ここでは、引き続き Web 投票アプリケーションの開発を続け、 チュートリアル その2 で少し触れた、Django が 自動生成する管理サイトのカスタマイズに焦点を当 ... ルごとに admin クラスを作成して、 admin.site.register() の 2 番目の引数に渡すと いうパターンに従ってください。 上の例では、「Publication date」フィールドの表示位置を「Question」フィールドよりも前に変更しています: 二つしかフィールドがないので、あまりぱっとした ...
https://man.mtool.work/django/6.1/intro/tutorial07.html
PREV 1 NEXT