... ビュー View class View 属性 (とオプションのアクセサ): http_method_names メソッド as_view() dispatch() head() http_method_not_allowed() setup() TemplateView class TemplateView 属性 (とオプションのアクセサ): content_type extra_context http_method_names re ... ngine template_name [ get_template_names() ] メソッド as_view() dispatch() get() get_context_data() head() http_method_not_allowed() render_to_response() setup() RedirectView class RedirectView 属性 (とオプションのアクセサ): http_method_names pattern_ ... name permanent query_string url [ get_redirect_url() ] メソッド as_view() delete() dispatch() get() head() http_method_not_allowed() options() post() put() setup() 詳細ビュー DetailView class DetailView 属性 (とオプションのアクセサ): content_type cont ... ... dexView class ArchiveIndexView [ソース] "最新の"オブジェクトを、日付によって表示するトップレベルのインデックスページです。 allow_future を True にセットしない限り、 未来 の日付のオブジェクトは含まれません。 継承元 (MRO) django.views.generic.list.Multi ... 力します。 YearArchiveView class YearArchiveView [ソース] 与えられた年の中で有効な月を表示する、年次のアーカイブページです。 allow_future を True にセットしない限り、 未来 の日付を伴うオブジェクトは表示されません。 継承元 (MRO) django.views.generic.list ... ueryset に従って利用可能なオブジェクトを持つ全ての月を含みます。 year : 与えられた年を表す date オブジェクト。 next_year : allow_empty と allow_future に従って、次の年の最初の日を表す date オブジェクト。 previous_year : date オブジェクト。 allow_empty ... ... 404 を返します。 get_next_year ( date ) [ソース] 指定した日付の翌年の最初の日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外を発生させたりします。 get_previous_year ( date ) [ソース ... ] 指定した日付の前の年の最初の日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外を発生させたりします。 MonthMixin class MonthMixin [ソース ... 場合は 404 を返します。 get_next_month ( date ) [ソース] 指定した日付の翌月初日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外が発生したりします。 get_previous_month ( date ) [ソース] ... ... ーミッションが Meta.default_permissions に追加されました。新しいパーミッションは migrate 実行時に自動的に作成されます。 This allows giving users read-only access to models in the admin. ModelAdmin.has_view_permission() is new. The implementation is back ... wards compatible in that there isn't a need to assign the "view" permission to allow users who have the "change" permission to edit objects. There are a couple of backwards incompatible considerations . マイ ... d__exact . jQuery のバージョンが 2.2.3 から 3.3.1 にアップグレードされました。 The new ModelAdmin.delete_queryset() method allows customizing the deletion process of the "delete selected objects" action. You can now override the default admin site . T ... ... 。インストールする拡張機能の名前です。 hints New in Django 6.0. The optional hints argument will be passed as **hints to the allow_migrate() method of database routers to assist them in making routing decisions . BloomExtension class BloomExtension ( hi ... bloom 拡張機能をインストールします。 hints New in Django 6.0. The optional hints argument will be passed as **hints to the allow_migrate() method of database routers to assist them in making routing decisions . BtreeGinExtension class BtreeGinExtensio ... e_gin 拡張機能をインストールします。 hints New in Django 6.0. The optional hints argument will be passed as **hints to the allow_migrate() method of database routers to assist them in making routing decisions . BtreeGistExtension class BtreeGistExtens ... ... Content-Security-Policy HTTP ヘッダーを有効にすることができるようになりました。 The new InlineModelAdmin.classes attribute allows specifying classes on inline fieldsets. Inlines with a collapse class will be initially collapsed and their header will h ... ects and prevents a user from being able to log out. Added the optional backend argument to django.contrib.auth.login() to allow using it without credentials. The new LOGOUT_REDIRECT_URL setting controls the redirect of the django.contrib.auth.views.l ... n't get a next_page argument. The new redirect_authenticated_user parameter for the django.contrib.auth.views.login() view allows redirecting authenticated users visiting the login page. 新しい AllowAllUsersModelBackend および AllowAllUsersRemoteUserB ... ... the release of Django 1.8. Django 1.7 の新機能 Schema migrations Django now has built-in support for schema migrations. It allows models to be updated, changed, and deleted by creating migration files that represent the model changes and which can be ... d post_migrate respectively. These new signals have slightly different arguments. Check the documentation for details. The allow_syncdb method on database routers is now called allow_migrate , but still performs the same function. Routers with allow_s ... , including the class name. args : Positional arguments, as a list kwargs : Keyword arguments, as a dict These four values allow any field to be serialized into a file, as well as allowing the field to be copied safely, both essential parts of these n ... ... There is a corresponding form field . Query Expressions, Conditional Expressions, and Database Functions Query Expressions allow you to create, customize, and compose complex SQL expressions. This has enabled annotate to accept expressions other than ... arithmetic, similar to F() objects. order_by() has also gained the ability to accept expressions. Conditional Expressions allow you to use if ... elif ... else logic within queries. A collection of database functions is also included with functionali ... ty such as Coalesce , Concat , and Substr . TestCase data setup TestCase has been refactored to allow for data initialization at the class level using transactions and savepoints. Database backends which do not support trans ... ... oogle made members of the Ruby on Rails development team aware of a combination of browser plugins and redirects which can allow an attacker to provide custom HTTP headers on a request to any website. This can allow a forged request to appear to be an ... HTTP header X-CSRFTOKEN, as well as in the form submission itself, for ease of use with popular JavaScript toolkits which allow insertion of custom headers into all AJAX requests. Please see the CSRF docs for example jQuery code that demonstrates thi ... ... g and StringAgg determines the ordering of the aggregated elements. The new BTreeIndex , HashIndex and SpGistIndex classes allow creating B-Tree , hash , and SP-GiST indexes in the database. BrinIndex now has the autosummarize parameter. The new searc ... h_type parameter of SearchQuery allows searching for a phrase or raw expression. django.contrib.staticfiles Added path matching to the collectstatic --ignore op ... SQLite. ジェネリックビュー (汎用ビュー) The new View.setup hook initializes view attributes before calling dispatch() . It allows mixins to set up instance attributes for reuse in child classes. 国際化 (internationalization) Added support and translat ... 2026年10月08日