... = models . DateField () def get_absolute_url ( self ): return reverse ( "article-detail" , kwargs = { "pk" : self . pk }) ArchiveIndexView class ArchiveIndexView [ソース] "最新の"オブジェクトを、日付によって表示するトップレベルのインデックスページです。 ... ic.list.MultipleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseArchiveIndexView django.views.generic.dates.BaseDateListView django.views.generic.list.MultipleObjectMixin django.views.generic.da ... ジェクトとして表され、降順で表示されます。 ノート デフォルトの context_object_name として latest を使います。 デフォルトの _archive の template_name_suffix を使います。 年によって date_list を提供する動作がデフォルトですが、 date_list_period 属性を用いた ... ... pp --template and startproject --template , allowed directory-traversal via an archive with absolute paths or relative paths with dot segments. ... ... pp --template and startproject --template , allowed directory-traversal via an archive with absolute paths or relative paths with dot segments. ... ... views urlpatterns = [ path ( "articles/2003/" , views . special_case_2003 ), path ( "articles/<int:year>/" , views . year_archive ), path ( "articles/<int:year>/<int:month>/" , views . month_archive ), path ( "articles/<int:year>/<int:month>/<slug:slug ... です。 リクエストの例: articles/2005/03/ へのリクエストはリストの 3 番目のエントリにマッチします。Django は関数 views.month_archive(request, year=2005, month=3) を呼び出します。 /articles/2003/ はリストの最初のパターンにマッチしますが、2番目のパターンには ... yy" ) urlpatterns = [ path ( "articles/2003/" , views . special_case_2003 ), path ( "articles/<yyyy:year>/" , views . year_archive ), ... , ] 正規表現を使う パスとコンバータ構文だけでは URL パターンを定義するのに不十分な場合は、正規表現を使うこともできま ... ... startapp --template and startproject --template , allowed directory-traversal via an archive with absolute paths or relative paths with dot segments. バグ修正 Fixed an admin layout issue in Django 3.1 where changeli ... ... のセキュリティリリース 、Djangoの新リリース、そしてセキュリティアドバイザリに関する告知を行います。 django-announce mailing archive django-announce subscription email address django-announce posting email django-updates すべてのチケット更新はこのリストに ... 自動的にメールされ、開発者や関心のあるコミュニティメンバーによって追跡されます。 django-updates mailing archive django-updates subscription email address django-updates posting email Archived mailing lists The following mailing lists ... are archived and no longer active. These are still available as a historical resource. django-users 注釈 official Forum の Using Djang ... ... xact revisions from which packaged Django releases were produced, since version 1.0. A number of tags also exist under the archive/ prefix for archived work . The source code for the Djangoproject.com website can be found at github.com/django/djangoproj ... ango releases. タグ Each Django release is tagged and signed by the releaser. The tags can be found on GitHub's tags page. Archived feature-development work Historical information Since Django moved to Git in 2012, anyone can clone the repository and cr ... und, branches of Django which are closed and no longer maintained were moved into attic . A number of tags exist under the archive/ prefix to maintain a reference to this and other work of historical interest. The following tags under the archive/attic/ ... ... news/urls.py from django.urls import path from . import views urlpatterns = [ path ( "articles/<int:year>/" , views . year_archive ), path ( "articles/<int:year>/<int:month>/" , views . month_archive ), path ( "articles/<int:year>/<int:month>/<int:pk>/" ... てデータベースからデータを取り出し、テンプレートをロードして、取り出したデータでテンプレートをレンダリングします。 上の year_archive のビューを例に示しましょう: news/views.py from django.shortcuts import render from .models import Article def year_archive ... ilter ( pub_date__year = year ) context = { "year" : year , "article_list" : a_list } return render ( request , "news/year_archive.html" , context ) この例では Django の テンプレートシステム を使っています。テンプレートシステムは、強力な機能をいくつも備 ... ... 可能なビューオブジェクトを指定できます。たとえば、下記の url が与えられている場合を考えます。 from news import views path ( "archive/" , views . archive , name = "news-archive" ) URL を逆引きするために、以下の方法を使用できます: # using the named URL reve ... rse ( "news-archive" ) # passing a callable object # (This is discouraged because you can't reverse namespaced views this way.) from news impo ... rt views reverse ( views . archive ) URLが引数を受け入れる場合は、 args にそれらを渡すことができます。例えば: from django.urls import reverse def myview ( re ... ... 辞書展開によって指定することで、攻撃が可能でした。(この問題は CVE 2022-28346 に対するフォローアップです。) CVE-2025-59682: archive.extract() を介した部分的なディレクトリトラバーサルの可能性 django.utils.archive.extract() 関数は、 startapp --template およ ... 2026年10月08日