... s two complementary headers: Content-Security-Policy : Enforces the CSP policy, blocking content that violates the defined directives. Content-Security-Policy-Report-Only : Reports CSP violations without blocking content, allowing for non-intrusive testin ... g. Each policy is composed of one or more directives and their values, which together instruct the browser on how to handle specific types of content. When the ContentSecurit ... immediate feedback during development. To also receive these reports programmatically, the policy must include a reporting directive such as report-uri that specifies where violation data should be sent. Django supports configuring these directives via th ... ... s two complementary headers: Content-Security-Policy : Enforces the CSP policy, blocking content that violates the defined directives. Content-Security-Policy-Report-Only : Reports CSP violations without blocking content, allowing for non-intrusive testin ... g. Each policy is composed of one or more directives and their values, which together instruct the browser on how to handle specific types of content. When the ContentSecurit ... immediate feedback during development. To also receive these reports programmatically, the policy must include a reporting directive such as report-uri that specifies where violation data should be sent. Django supports configuring these directives via th ... ... er. For example, use :cve:`2019-14232` . When documenting Python objects (classes, methods, attributes, etc.) using Sphinx directives such as .. class:: , .. method:: , and .. attribute:: , all content must be properly indented to ensure correct rendering ... and to support features like automatic table of contents generation. Follow these rules: The directive itself remains flush with the left margin (no indentation). All descriptive text under the directive must be indented by 4 ... spaces. Multi-line descriptions must keep the same indentation level. Nested directives (for example, methods inside a class) require an additional 4 spaces of indentation to maintain hierarchy. Field lists (s ... ... er. For example, use :cve:`2019-14232` . When documenting Python objects (classes, methods, attributes, etc.) using Sphinx directives such as .. class:: , .. method:: , and .. attribute:: , all content must be properly indented to ensure correct rendering ... and to support features like automatic table of contents generation. Follow these rules: The directive itself remains flush with the left margin (no indentation). All descriptive text under the directive must be indented by 4 ... spaces. Multi-line descriptions must keep the same indentation level. Nested directives (for example, methods inside a class) require an additional 4 spaces of indentation to maintain hierarchy. Field lists (s ... ... to/mysite.com/mysite/wsgi.py Require group secret-agents Require valid-user </Location> To support the WSGIAuthGroupScript directive, the same WSGI script mysite.wsgi must also import the groups_for_user function which returns a list of groups the given u ... ... シー (Cross-Origin Opener Policy) ヘッダを設定します。 SECURE_CSP ¶ New in Django 6.0. Default: {} This setting defines the directives used by the ContentSecurityPolicyMiddleware , which generates and adds a Content-Security-Policy (CSP) header to all resp ... es for content such as scripts, styles, images, fonts, and more. The setting must be a mapping (typically a dictionary) of directive names to their values. Each key should be a valid CSP directive such as default-src or script-src . The corresponding valu ... e can be a list, tuple, or set of source expressions or URLs to allow for that directive. If a set is used, it will be automatically sorted to ensure consistent output in the generated headers. This example illu ... ... キャッシュ ¶ The cache_control() decorator and patch_cache_control() method now support multiple field names in the no-cache directive for the Cache-Control header, according to RFC 7234 Section 5.2.2.2 . delete() は、キーが正常に削除された場合は True を返し ... .debug.SafeExceptionReporterFilter . The cache timeout set by cache_page() decorator now takes precedence over the max-age directive from the Cache-Control header. Providing a non-local remote field in the ForeignKey.to_field argument now raises FieldErro ... ... to/mysite.com/mysite/wsgi.py Require group secret-agents Require valid-user </Location> To support the WSGIAuthGroupScript directive, the same WSGI script mysite.wsgi must also import the groups_for_user function which returns a list of groups the given u ... ... シー (Cross-Origin Opener Policy) ヘッダを設定します。 SECURE_CSP ¶ New in Django 6.0. Default: {} This setting defines the directives used by the ContentSecurityPolicyMiddleware , which generates and adds a Content-Security-Policy (CSP) header to all resp ... es for content such as scripts, styles, images, fonts, and more. The setting must be a mapping (typically a dictionary) of directive names to their values. Each key should be a valid CSP directive such as default-src or script-src . The corresponding valu ... e can be a list, tuple, or set of source expressions or URLs to allow for that directive. If a set is used, it will be automatically sorted to ensure consistent output in the generated headers. This example illu ... ... キャッシュ ¶ The cache_control() decorator and patch_cache_control() method now support multiple field names in the no-cache directive for the Cache-Control header, according to RFC 7234 Section 5.2.2.2 . delete() は、キーが正常に削除された場合は True を返し ... .debug.SafeExceptionReporterFilter . The cache timeout set by cache_page() decorator now takes precedence over the max-age directive from the Cache-Control header. Providing a non-local remote field in the ForeignKey.to_field argument now raises FieldErro ... 2026年10月08日