... 、 DELETE など) で利用できます。 Django がビューから送り返す各ページ (レスポンス) に対して、Django は2種類の HTTP ヘッダ、 ETag ヘッダと Last-Modified ヘッダを提供できます。これらのヘッダは HTTP レスポンス上ではオプションです。ヘッダはビュー関数で設定 ... することも、 ConditionalGetMiddleware ミドルウェアを使用して ETag ヘッダを設定してもらうこともできます。 When the client next requests the same resource, it might send along a header such ... , containing the date of the last modification time it was sent, or either If-Match or If-None-Match , containing the last ETag it was sent. If the current version of the page matches the ETag sent by the client, or if the resource has not been modif ... ... ー処理 django.views.decorators.http にある以下のデコレータを使って、特定のビューのキャッシュ動作を制御できます。 condition ( etag_func = None , last_modified_func = None ) [ソース] conditional_page () このデコレータを使用すると、ビューに ConditionalGet ... Middleware と同等の条件付き GET 処理を追加できます。 etag ( etag_func ) [ソース] last_modified ( last_modified_func ) [ソース] これらのデコレータは ETag と Last-Modified ヘッダを生 ... ... t-Encoding ヘッダを設定している。 リクエスト(ブラウザ)が Accept-Encoding ヘッダに gzip を含んでいない。 もしレスポンスに ETag ヘッダーがあれば、ETag は、 RFC 9110 Section 8.8.1 に準拠するために弱い形式になります。 You can apply GZip compression to ... ge() decorator. Conditional GET middleware class ConditionalGetMiddleware [ソース] 条件付きGET操作を扱います。レスポンスに ETag ヘッダーがない場合、必要に応じてミドルウェアが追加します。レスポンスに ETag または Last-Modified ヘッダーがあり、リクエスト ... e の後に置きます。 ConditionalGetMiddleware レスポンスを変更する可能性があるミドルウェアよりも前に設定してください (これは ETag ヘッダを設定します)。 gzip されたコンテンツに対して ETag ヘッダを計算しないように、 GZipMiddleware の後に置きます。 Locale ... ... ng to allow appending the preload directive to the Strict-Transport-Security header. ConditionalGetMiddleware now adds the ETag header to responses. シリアライズ (シリアル化) The new django.core.serializers.base.Serializer.stream_class attribute allo ... you can unpack the group object directly in a loop, e.g. {% for grouper, list in regrouped %} . Added a resetcycle template tag to allow resetting the sequence of the cycle template tag. You can now specify specific directories for a particular file ... is False (the latter option defaults to the value of DEBUG ). This could be backwards-incompatible if you have some template tags that aren't thread safe . 古いコンテンツタイプ削除のプロンプトが、 migrate コマンド後に表示されなくなりました。代わりに、 ... ... one fell swoop. 条件付きのビュー処理 Django now has much better support for conditional view processing using the standard ETag and Last-Modified HTTP headers. This means you can now easily short-circuit view processing by testing less-expensive cond ... ed control of when and where the CSRF processing takes place. reverse() and code which uses it (e.g., the {% url %} template tag) now works with URLs in Django's administrative site, provided that the admin URLs are set up via include(admin.site.urls ... % empty %} clause, to be displayed when {% for %} is asked to loop over an empty sequence. See the list of built-in template tags for examples of this. The dumpdata management command now accepts individual model names as arguments, allowing you to e ... ... unning the database system checks. Previously these checks were enabled for all configured DATABASES by passing the database tag to the command. The new migrate --check option makes the command exit with a non-zero status when unapplied migrations ar ... meter of the Signer allows customizing the hashing algorithm. テンプレート The renamed translate and blocktranslate template tags are introduced for internationalization in template code. The older trans and blocktrans template tags aliases continue ... to work, and will be retained for the foreseeable future. The include template tag now accepts iterables of template names. テスト SimpleTestCase now implements the debug() method to allow running a test ... ... ookie() requires_csrf_token() sensitive_variables() sensitive_post_parameters() gzip_page() condition() conditional_page() etag() last_modified() require_http_methods() require_GET() require_POST() require_safe() vary_on_cookie() vary_on_headers() xf ... ... 善に役立ついくつかの ミドルウェア を用意しています。以下のようなものがあります。 ConditionalGetMiddleware モダンなブラウザが ETag と Last-Modified ヘッダを元に条件的にレスポンスを GET するためのサポートを追加します。 GZipMiddleware すべてのモダンブラウ ... ... ookie() requires_csrf_token() sensitive_variables() sensitive_post_parameters() gzip_page() condition() conditional_page() etag() last_modified() require_http_methods() require_GET() require_POST() require_safe() vary_on_cookie() vary_on_headers() xf ... ... teField の属性) autocomplete_fields (ModelAdmin の属性) autodiscover() (django.contrib.admin モジュール) autoescape template tag AutoField (django.db.models のクラス) available_apps (TransactionTestCase の属性) avalues() (backends.base.SessionBase の ... trib.postgres.aggregates のクラス) (django.db.models のクラス) blank (Field の属性) (ModelChoiceField の属性) block template tag blocktrans template tag blocktranslate template tag BloomExtension (django.contrib.postgres.operations のクラス) BloomInd ... uerySet モジュール) bulk_update() (django.db.models.query.QuerySet モジュール) byteorder (WKBWriter の属性) C cache template tag cache_control() (django.views.decorators.cache モジュール) cache_key_prefix (backends.cached_db.SessionStore の属性) CACH ... 2026年10月08日