{"title":"設定","version":"3.1","locale":"ja","docname":"ref/settings","url":"/ja/3.1/ref/settings/","canonical":"https://djangodocs.dev/ja/3.1/ref/settings/","summary":"コアの設定 Auth メッセージ セッション サイト 静的ファイル Core Settings Topical Index 警告 Be careful when you override settings, especially when the default value is a non-empty list or…","html":"<h1>設定<a class=\"heading-anchor\" href=\"#settings\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<nav class=\"contents local\" id=\"id1\">\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#core-settings\" id=\"id13\">コアの設定</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#auth\" id=\"id14\">Auth</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#messages\" id=\"id15\">メッセージ</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#sessions\" id=\"id16\">セッション</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#sites\" id=\"id17\">サイト</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#static-files\" id=\"id18\">静的ファイル</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#core-settings-topical-index\" id=\"id19\">Core Settings Topical Index</a></p></li>\n</ul>\n</nav>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p>Be careful when you override settings, especially when the default value\nis a non-empty list or dictionary, such as <a class=\"reference internal\" href=\"#std-setting-STATICFILES_FINDERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_FINDERS</span></code></a>.\nMake sure you keep the components required by the features of Django you\nwish to use.</p>\n</aside>\n<section id=\"core-settings\">\n<h2><a class=\"toc-backref\" href=\"#id13\" role=\"doc-backlink\">コアの設定</a><a class=\"headerlink\" href=\"#core-settings\" title=\"Link to this heading\">¶</a></h2>\n<p>ここでは、Django の core で利用できる設定とそのデフォルト値をリストしました。contrib アプリで提供される設定のリストは、core の設定のトピックのインデックスの下にあります。入門的な資料については、 <a class=\"reference internal\" href=\"/ja/3.1/topics/settings/\"><span class=\"doc\">settings topic guide</span></a> をご覧ください。</p>\n<section id=\"absolute-url-overrides\">\n<span id=\"std-setting-ABSOLUTE_URL_OVERRIDES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">ABSOLUTE_URL_OVERRIDES</span></code><a class=\"heading-anchor\" href=\"#absolute-url-overrides\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (空の辞書)</p>\n<p>A dictionary mapping <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;app_label.model_name&quot;</span></code> strings to functions that take\na model object and return its URL. This is a way of inserting or overriding\n<code class=\"docutils literal notranslate\"><span class=\"pre\">get_absolute_url()</span></code> methods on a per-installation basis. Example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">ABSOLUTE_URL_OVERRIDES</span> <span class=\"o\">=</span> <span class=\"p\">{</span>\n    <span class=\"s1\">&#39;blogs.weblog&#39;</span><span class=\"p\">:</span> <span class=\"k\">lambda</span> <span class=\"n\">o</span><span class=\"p\">:</span> <span class=\"s2\">&quot;/blogs/</span><span class=\"si\">%s</span><span class=\"s2\">/&quot;</span> <span class=\"o\">%</span> <span class=\"n\">o</span><span class=\"o\">.</span><span class=\"n\">slug</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;news.story&#39;</span><span class=\"p\">:</span> <span class=\"k\">lambda</span> <span class=\"n\">o</span><span class=\"p\">:</span> <span class=\"s2\">&quot;/stories/</span><span class=\"si\">%s</span><span class=\"s2\">/</span><span class=\"si\">%s</span><span class=\"s2\">/&quot;</span> <span class=\"o\">%</span> <span class=\"p\">(</span><span class=\"n\">o</span><span class=\"o\">.</span><span class=\"n\">pub_year</span><span class=\"p\">,</span> <span class=\"n\">o</span><span class=\"o\">.</span><span class=\"n\">slug</span><span class=\"p\">),</span>\n<span class=\"p\">}</span>\n</code></pre></div>\n<p>The model name used in this setting should be all lowercase, regardless of the\ncase of the actual model class name.</p>\n</section>\n<section id=\"admins\">\n<span id=\"std-setting-ADMINS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code><a class=\"heading-anchor\" href=\"#admins\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>A list of all the people who get code error notifications. When\n<a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG=False</span></code></a> and <a class=\"reference internal\" href=\"/ja/3.1/topics/logging/#django.utils.log.AdminEmailHandler\" title=\"django.utils.log.AdminEmailHandler\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">AdminEmailHandler</span></code></a>\nis configured in <a class=\"reference internal\" href=\"#std-setting-LOGGING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOGGING</span></code></a> (done by default), Django emails these\npeople the details of exceptions raised in the request/response cycle.</p>\n<p>Each item in the list should be a tuple of (Full name, email address). Example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[(</span><span class=\"s1\">&#39;John&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;john@example.com&#39;</span><span class=\"p\">),</span> <span class=\"p\">(</span><span class=\"s1\">&#39;Mary&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;mary@example.com&#39;</span><span class=\"p\">)]</span>\n</code></pre></div>\n</section>\n<section id=\"allowed-hosts\">\n<span id=\"std-setting-ALLOWED_HOSTS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code><a class=\"heading-anchor\" href=\"#allowed-hosts\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>Django サイトを配信できるホスト/ドメイン名を表す文字列のリストです。これはセキュリティ対策の手段の1つで、一見安全な設定の Web サーバでも晒される可能性が高い、 <a class=\"reference internal\" href=\"/ja/3.1/topics/security/#host-headers-virtual-hosting\"><span class=\"std std-ref\">HTTP Host header 攻撃</span></a> を防ぐことができます。</p>\n<p>このリスト中の値は完全修飾名 (fully qualified names) (例: <code class=\"docutils literal notranslate\"><span class=\"pre\">'www.example.com'</span></code>) でも大丈夫です。その場合には、リクエストの <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> ヘッダに完全一致するかチェックされます (ポートを含まない、大文字小文字を無視した比較になります)。ピリオドで始まる値は、サブドメインのワイルドカードとして利用できます。たとえば、<code class=\"docutils literal notranslate\"><span class=\"pre\">'.example.com'</span></code> は <code class=\"docutils literal notranslate\"><span class=\"pre\">example.com</span></code> や <code class=\"docutils literal notranslate\"><span class=\"pre\">www.example.com</span></code> などの他のすべての <code class=\"docutils literal notranslate\"><span class=\"pre\">example.com</span></code> サブドメインにマッチします。<code class=\"docutils literal notranslate\"><span class=\"pre\">'*'</span></code> という値はあらゆるヘッダにマッチします。この場合には、責任を持って自前の <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> ヘッダ検証機 (おそらくミドルウェアの形になり、その場合は <a class=\"reference internal\" href=\"#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE</span></code></a> 設定の最初に置く必要があります) を書かなければなりません。</p>\n<p>Django はあらゆるエントリで <a class=\"reference external\" href=\"https://en.wikipedia.org/wiki/Fully_qualified_domain_name\">fully qualified domain name (FQDN)</a> を許可しています。ブラウザの中には``Host`` ヘッダの最後にドットを付けるもありますが、Django は host の検証機でそれを取り除きます。</p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> ヘッダ (と <a class=\"reference internal\" href=\"#std-setting-USE_X_FORWARDED_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_HOST</span></code></a> が有効な場合は <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Host</span></code>) が、このリストのどれとも一致しない場合、 <a class=\"reference internal\" href=\"/ja/3.1/ref/request-response/#django.http.HttpRequest.get_host\" title=\"django.http.HttpRequest.get_host\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">django.http.HttpRequest.get_host()</span></code></a> は <a class=\"reference internal\" href=\"/ja/3.1/ref/exceptions/#django.core.exceptions.SuspiciousOperation\" title=\"django.core.exceptions.SuspiciousOperation\"><code class=\"xref py py-exc docutils literal notranslate\"><span class=\"pre\">SuspiciousOperation</span></code></a> 例外を起こします。</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code> is empty, the host\nis validated against <code class=\"docutils literal notranslate\"><span class=\"pre\">['.localhost',</span> <span class=\"pre\">'127.0.0.1',</span> <span class=\"pre\">'[::1]']</span></code>.</p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code> is also <a class=\"reference internal\" href=\"/ja/3.1/topics/testing/advanced/#topics-testing-advanced-multiple-hosts\"><span class=\"std std-ref\">checked when running tests</span></a>.</p>\n<p>このヘッダの検証は <a class=\"reference internal\" href=\"/ja/3.1/ref/request-response/#django.http.HttpRequest.get_host\" title=\"django.http.HttpRequest.get_host\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">get_host()</span></code></a> メソッドの実行時にのみ適用されます。もし <code class=\"docutils literal notranslate\"><span class=\"pre\">request.META</span></code> から直接 <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> ヘッダにアクセスするコードを書いてしまうと、このセキュリティプロテクションを回避してしまうので注意してください。</p>\n<aside class=\"version-note version-changed\" data-version=\"3.1\">\n<p class=\"version-note-title\">Changed in Django 3.1</p><p>If <code class=\"docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code> is empty and <code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG=True</span></code>, subdomains of localhost\nwere allowed.</p>\n</aside>\n</section>\n<section id=\"append-slash\">\n<span id=\"std-setting-APPEND_SLASH\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">APPEND_SLASH</span></code><a class=\"heading-anchor\" href=\"#append-slash\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code></p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> に設定すると、リクエスト URL が URLconf 内のどのパターンにもマッチせず、/ で終わっていなかった場合に、末尾に / を追加した URL への HTTP リダイレクトを発行します。ただし、リダイレクトすると POST リクエストで送信するデータが失われることがあるので注意が必要です。</p>\n<p><a class=\"reference internal\" href=\"#std-setting-APPEND_SLASH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">APPEND_SLASH</span></code></a> 設定は <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.common.CommonMiddleware\" title=\"django.middleware.common.CommonMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">CommonMiddleware</span></code></a> がインストールされているときのみ有効です。詳しくは see <a class=\"reference internal\" href=\"/ja/3.1/topics/http/middleware/\"><span class=\"doc\">ミドルウェア (Middleware)</span></a> を参照。また <a class=\"reference internal\" href=\"#std-setting-PREPEND_WWW\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">PREPEND_WWW</span></code></a> もお読みください。</p>\n</section>\n<section id=\"caches\">\n<span id=\"std-setting-CACHES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CACHES</span></code><a class=\"heading-anchor\" href=\"#caches\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">{</span>\n    <span class=\"s1\">&#39;default&#39;</span><span class=\"p\">:</span> <span class=\"p\">{</span>\n        <span class=\"s1\">&#39;BACKEND&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;django.core.cache.backends.locmem.LocMemCache&#39;</span><span class=\"p\">,</span>\n    <span class=\"p\">}</span>\n<span class=\"p\">}</span>\n</code></pre></div>\n<p>A dictionary containing the settings for all caches to be used with\nDjango. It is a nested dictionary whose contents maps cache aliases\nto a dictionary containing the options for an individual cache.</p>\n<p>The <a class=\"reference internal\" href=\"#std-setting-CACHES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CACHES</span></code></a> setting must configure a <code class=\"docutils literal notranslate\"><span class=\"pre\">default</span></code> cache;\nany number of additional caches may also be specified. If you\nare using a cache backend other than the local memory cache, or\nyou need to define multiple caches, other options will be required.\nThe following cache options are available.</p>\n<section id=\"backend\">\n<span id=\"std-setting-CACHES-BACKEND\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">BACKEND</span></code><a class=\"heading-anchor\" href=\"#backend\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>使用するキャッシュ用バックエンド。ビルトインのキャッシュ用バックエンドには、次のものがあります。</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.core.cache.backends.db.DatabaseCache'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.core.cache.backends.dummy.DummyCache'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.core.cache.backends.filebased.FileBasedCache'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.core.cache.backends.locmem.LocMemCache'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.core.cache.backends.memcached.MemcachedCache'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.core.cache.backends.memcached.PyLibMCCache'</span></code></p></li>\n</ul>\n<p>Django に同梱されていないキャッシュ用バックエンドを使用する時は、<a class=\"reference internal\" href=\"#std-setting-CACHES-BACKEND\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">BACKEND</span></code></a> にバックエンドのクラスの完全修飾パス (例: <code class=\"docutils literal notranslate\"><span class=\"pre\">mypackage.backends.whatever.WhateverCache</span></code>) を設定してください。</p>\n</section>\n<section id=\"key-function\">\n<span id=\"std-setting-CACHES-KEY_FUNCTION\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">KEY_FUNCTION</span></code><a class=\"heading-anchor\" href=\"#key-function\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>A string containing a dotted path to a function (or any callable) that defines how to\ncompose a prefix, version and key into a final cache key. The default\nimplementation is equivalent to the function:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">make_key</span><span class=\"p\">(</span><span class=\"n\">key</span><span class=\"p\">,</span> <span class=\"n\">key_prefix</span><span class=\"p\">,</span> <span class=\"n\">version</span><span class=\"p\">):</span>\n    <span class=\"k\">return</span> <span class=\"s1\">&#39;:&#39;</span><span class=\"o\">.</span><span class=\"n\">join</span><span class=\"p\">([</span><span class=\"n\">key_prefix</span><span class=\"p\">,</span> <span class=\"nb\">str</span><span class=\"p\">(</span><span class=\"n\">version</span><span class=\"p\">),</span> <span class=\"n\">key</span><span class=\"p\">])</span>\n</code></pre></div>\n<p>You may use any key function you want, as long as it has the same\nargument signature.</p>\n<p>See the <a class=\"reference internal\" href=\"/ja/3.1/topics/cache/#cache-key-transformation\"><span class=\"std std-ref\">cache documentation</span></a> for more\ninformation.</p>\n</section>\n<section id=\"key-prefix\">\n<span id=\"std-setting-CACHES-KEY_PREFIX\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">KEY_PREFIX</span></code><a class=\"heading-anchor\" href=\"#key-prefix\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>A string that will be automatically included (prepended by default) to\nall cache keys used by the Django server.</p>\n<p>See the <a class=\"reference internal\" href=\"/ja/3.1/topics/cache/#cache-key-prefixing\"><span class=\"std std-ref\">cache documentation</span></a> for more information.</p>\n</section>\n<section id=\"location\">\n<span id=\"std-setting-CACHES-LOCATION\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">LOCATION</span></code><a class=\"heading-anchor\" href=\"#location\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>The location of the cache to use. This might be the directory for a\nfile system cache, a host and port for a memcache server, or an identifying\nname for a local memory cache. e.g.:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">CACHES</span> <span class=\"o\">=</span> <span class=\"p\">{</span>\n    <span class=\"s1\">&#39;default&#39;</span><span class=\"p\">:</span> <span class=\"p\">{</span>\n        <span class=\"s1\">&#39;BACKEND&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;django.core.cache.backends.filebased.FileBasedCache&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;LOCATION&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;/var/tmp/django_cache&#39;</span><span class=\"p\">,</span>\n    <span class=\"p\">}</span>\n<span class=\"p\">}</span>\n</code></pre></div>\n</section>\n<section id=\"options\">\n<span id=\"std-setting-CACHES-OPTIONS\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">OPTIONS</span></code><a class=\"heading-anchor\" href=\"#options\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>Extra parameters to pass to the cache backend. Available parameters\nvary depending on your cache backend.</p>\n<p>Some information on available parameters can be found in the\n<a class=\"reference internal\" href=\"/ja/3.1/topics/cache/#cache-arguments\"><span class=\"std std-ref\">cache arguments</span></a> documentation. For more information,\nconsult your backend module's own documentation.</p>\n</section>\n<section id=\"timeout\">\n<span id=\"std-setting-CACHES-TIMEOUT\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">TIMEOUT</span></code><a class=\"heading-anchor\" href=\"#timeout\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">300</span></code></p>\n<p>The number of seconds before a cache entry is considered stale. If the value of\nthis settings is <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, cache entries will not expire.</p>\n</section>\n<section id=\"version\">\n<span id=\"std-setting-CACHES-VERSION\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code><a class=\"heading-anchor\" href=\"#version\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">1</span></code></p>\n<p>The default version number for cache keys generated by the Django server.</p>\n<p>See the <a class=\"reference internal\" href=\"/ja/3.1/topics/cache/#cache-versioning\"><span class=\"std std-ref\">cache documentation</span></a> for more information.</p>\n</section>\n</section>\n<section id=\"cache-middleware-alias\">\n<span id=\"std-setting-CACHE_MIDDLEWARE_ALIAS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CACHE_MIDDLEWARE_ALIAS</span></code><a class=\"heading-anchor\" href=\"#cache-middleware-alias\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'default'</span></code></p>\n<p>The cache connection to use for the <a class=\"reference internal\" href=\"/ja/3.1/topics/cache/#the-per-site-cache\"><span class=\"std std-ref\">cache middleware</span></a>.</p>\n</section>\n<section id=\"cache-middleware-key-prefix\">\n<span id=\"std-setting-CACHE_MIDDLEWARE_KEY_PREFIX\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CACHE_MIDDLEWARE_KEY_PREFIX</span></code><a class=\"heading-anchor\" href=\"#cache-middleware-key-prefix\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>A string which will be prefixed to the cache keys generated by the <a class=\"reference internal\" href=\"/ja/3.1/topics/cache/#the-per-site-cache\"><span class=\"std std-ref\">cache\nmiddleware</span></a>. This prefix is combined with the\n<a class=\"reference internal\" href=\"#std-setting-CACHES-KEY_PREFIX\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">KEY_PREFIX</span></code></a> setting; it does not replace it.</p>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/topics/cache/\"><span class=\"doc\">Django's cache framework</span></a>.</p>\n</section>\n<section id=\"cache-middleware-seconds\">\n<span id=\"std-setting-CACHE_MIDDLEWARE_SECONDS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CACHE_MIDDLEWARE_SECONDS</span></code><a class=\"heading-anchor\" href=\"#cache-middleware-seconds\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">600</span></code></p>\n<p>The default number of seconds to cache a page for the <a class=\"reference internal\" href=\"/ja/3.1/topics/cache/#the-per-site-cache\"><span class=\"std std-ref\">cache middleware</span></a>.</p>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/topics/cache/\"><span class=\"doc\">Django's cache framework</span></a>.</p>\n</section>\n<section id=\"csrf-cookie-age\">\n<span id=\"std-setting-CSRF_COOKIE_AGE\"></span><span id=\"settings-csrf\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_AGE</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-age\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">31449600</span></code> (approximately 1 year, in seconds)</p>\n<p>The age of CSRF cookies, in seconds.</p>\n<p>The reason for setting a long-lived expiration time is to avoid problems in\nthe case of a user closing a browser or bookmarking a page and then loading\nthat page from a browser cache. Without persistent cookies, the form submission\nwould fail in this case.</p>\n<p>Some browsers (specifically Internet Explorer) can disallow the use of\npersistent cookies or can have the indexes to the cookie jar corrupted on disk,\nthereby causing CSRF protection checks to (sometimes intermittently) fail.\nChange this setting to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> to use session-based CSRF cookies, which\nkeep the cookies in-memory instead of on persistent storage.</p>\n</section>\n<section id=\"csrf-cookie-domain\">\n<span id=\"std-setting-CSRF_COOKIE_DOMAIN\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_DOMAIN</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-domain\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The domain to be used when setting the CSRF cookie.  This can be useful for\neasily allowing cross-subdomain requests to be excluded from the normal cross\nsite request forgery protection.  It should be set to a string such as\n<code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;.example.com&quot;</span></code> to allow a POST request from a form on one subdomain to be\naccepted by a view served from another subdomain.</p>\n<p>Please note that the presence of this setting does not imply that Django's CSRF\nprotection is safe from cross-subdomain attacks by default - please see the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/csrf/#csrf-limitations\"><span class=\"std std-ref\">CSRF limitations</span></a> section.</p>\n</section>\n<section id=\"csrf-cookie-httponly\">\n<span id=\"std-setting-CSRF_COOKIE_HTTPONLY\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_HTTPONLY</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-httponly\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to use <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpOnly</span></code> flag on the CSRF cookie. If this is set to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, client-side JavaScript will not be able to access the CSRF cookie.</p>\n<p>Designating the CSRF cookie as <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpOnly</span></code> doesn't offer any practical\nprotection because CSRF is only to protect against cross-domain attacks. If an\nattacker can read the cookie via JavaScript, they're already on the same domain\nas far as the browser knows, so they can do anything they like anyway. (XSS is\na much bigger hole than CSRF.)</p>\n<p>Although the setting offers little practical benefit, it's sometimes required\nby security auditors.</p>\n<p>If you enable this and need to send the value of the CSRF token with an AJAX\nrequest, your JavaScript must pull the value <a class=\"reference internal\" href=\"/ja/3.1/ref/csrf/#acquiring-csrf-token-from-html\"><span class=\"std std-ref\">from a hidden CSRF token\nform input</span></a> instead of <a class=\"reference internal\" href=\"/ja/3.1/ref/csrf/#acquiring-csrf-token-from-cookie\"><span class=\"std std-ref\">from the cookie</span></a>.</p>\n<p>See <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_HTTPONLY</span></code></a> for details on <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpOnly</span></code>.</p>\n</section>\n<section id=\"csrf-cookie-name\">\n<span id=\"std-setting-CSRF_COOKIE_NAME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_NAME</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-name\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'csrftoken'</span></code></p>\n<p>The name of the cookie to use for the CSRF authentication token. This can be\nwhatever you want (as long as it's different from the other cookie names in\nyour application). See <a class=\"reference internal\" href=\"/ja/3.1/ref/csrf/\"><span class=\"doc\">クロスサイトリクエストフォージェリ (CSRF) 対策</span></a>.</p>\n</section>\n<section id=\"csrf-cookie-path\">\n<span id=\"std-setting-CSRF_COOKIE_PATH\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_PATH</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'/'</span></code></p>\n<p>The path set on the CSRF cookie. This should either match the URL path of your\nDjango installation or be a parent of that path.</p>\n<p>This is useful if you have multiple Django instances running under the same\nhostname. They can use different cookie paths, and each instance will only see\nits own CSRF cookie.</p>\n</section>\n<section id=\"csrf-cookie-samesite\">\n<span id=\"std-setting-CSRF_COOKIE_SAMESITE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SAMESITE</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-samesite\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'Lax'</span></code></p>\n<p>The value of the <a class=\"reference external\" href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite\">SameSite</a> flag on the CSRF cookie. This flag prevents the\ncookie from being sent in cross-site requests.</p>\n<p>See <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_SAMESITE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SAMESITE</span></code></a> for details about <code class=\"docutils literal notranslate\"><span class=\"pre\">SameSite</span></code>.</p>\n<aside class=\"version-note version-changed\" data-version=\"3.1\">\n<p class=\"version-note-title\">Changed in Django 3.1</p><p>Setting <code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SAMESITE</span> <span class=\"pre\">=</span> <span class=\"pre\">'None'</span></code> was allowed.</p>\n</aside>\n</section>\n<section id=\"csrf-cookie-secure\">\n<span id=\"std-setting-CSRF_COOKIE_SECURE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SECURE</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-secure\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to use a secure cookie for the CSRF cookie. If this is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>,\nthe cookie will be marked as &quot;secure&quot;, which means browsers may ensure that the\ncookie is only sent with an HTTPS connection.</p>\n</section>\n<section id=\"csrf-use-sessions\">\n<span id=\"std-setting-CSRF_USE_SESSIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_USE_SESSIONS</span></code><a class=\"heading-anchor\" href=\"#csrf-use-sessions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to store the CSRF token in the user's session instead of in a cookie.\nIt requires the use of <a class=\"reference internal\" href=\"/ja/3.1/topics/http/sessions/#module-django.contrib.sessions\" title=\"django.contrib.sessions: Provides session management for Django projects.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.sessions</span></code></a>.</p>\n<p>Storing the CSRF token in a cookie (Django's default) is safe, but storing it\nin the session is common practice in other web frameworks and therefore\nsometimes demanded by security auditors.</p>\n<p>Since the <a class=\"reference internal\" href=\"/ja/3.1/ref/views/#error-views\"><span class=\"std std-ref\">default error views</span></a> require the CSRF token,\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.contrib.sessions.middleware.SessionMiddleware\" title=\"django.contrib.sessions.middleware.SessionMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SessionMiddleware</span></code></a> must appear in\n<a class=\"reference internal\" href=\"#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE</span></code></a> before any middleware that may raise an exception to\ntrigger an error view (such as <a class=\"reference internal\" href=\"/ja/3.1/ref/exceptions/#django.core.exceptions.PermissionDenied\" title=\"django.core.exceptions.PermissionDenied\"><code class=\"xref py py-exc docutils literal notranslate\"><span class=\"pre\">PermissionDenied</span></code></a>)\nif you're using <code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_USE_SESSIONS</span></code>. See <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#middleware-ordering\"><span class=\"std std-ref\">Middleware の順序</span></a>.</p>\n</section>\n<section id=\"csrf-failure-view\">\n<span id=\"std-setting-CSRF_FAILURE_VIEW\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_FAILURE_VIEW</span></code><a class=\"heading-anchor\" href=\"#csrf-failure-view\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'django.views.csrf.csrf_failure'</span></code></p>\n<p>A dotted path to the view function to be used when an incoming request is\nrejected by the <a class=\"reference internal\" href=\"/ja/3.1/ref/csrf/\"><span class=\"doc\">CSRF protection</span></a>. The function should have\nthis signature:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">csrf_failure</span><span class=\"p\">(</span><span class=\"n\">request</span><span class=\"p\">,</span> <span class=\"n\">reason</span><span class=\"o\">=</span><span class=\"s2\">&quot;&quot;</span><span class=\"p\">):</span>\n    <span class=\"o\">...</span>\n</code></pre></div>\n<p>where <code class=\"docutils literal notranslate\"><span class=\"pre\">reason</span></code> is a short message (intended for developers or logging, not\nfor end users) indicating the reason the request was rejected. It should return\nan <a class=\"reference internal\" href=\"/ja/3.1/ref/request-response/#django.http.HttpResponseForbidden\" title=\"django.http.HttpResponseForbidden\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">HttpResponseForbidden</span></code></a>.</p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">django.views.csrf.csrf_failure()</span></code> accepts an additional <code class=\"docutils literal notranslate\"><span class=\"pre\">template_name</span></code>\nparameter that defaults to <code class=\"docutils literal notranslate\"><span class=\"pre\">'403_csrf.html'</span></code>. If a template with that name\nexists, it will be used to render the page.</p>\n</section>\n<section id=\"csrf-header-name\">\n<span id=\"std-setting-CSRF_HEADER_NAME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_HEADER_NAME</span></code><a class=\"heading-anchor\" href=\"#csrf-header-name\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'HTTP_X_CSRFTOKEN'</span></code></p>\n<p>The name of the request header used for CSRF authentication.</p>\n<p>As with other HTTP headers in <code class=\"docutils literal notranslate\"><span class=\"pre\">request.META</span></code>, the header name received from\nthe server is normalized by converting all characters to uppercase, replacing\nany hyphens with underscores, and adding an <code class=\"docutils literal notranslate\"><span class=\"pre\">'HTTP_'</span></code> prefix to the name.\nFor example, if your client sends a <code class=\"docutils literal notranslate\"><span class=\"pre\">'X-XSRF-TOKEN'</span></code> header, the setting\nshould be <code class=\"docutils literal notranslate\"><span class=\"pre\">'HTTP_X_XSRF_TOKEN'</span></code>.</p>\n</section>\n<section id=\"csrf-trusted-origins\">\n<span id=\"std-setting-CSRF_TRUSTED_ORIGINS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_TRUSTED_ORIGINS</span></code><a class=\"heading-anchor\" href=\"#csrf-trusted-origins\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>A list of hosts which are trusted origins for unsafe requests (e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">POST</span></code>).\nFor a <a class=\"reference internal\" href=\"/ja/3.1/ref/request-response/#django.http.HttpRequest.is_secure\" title=\"django.http.HttpRequest.is_secure\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">secure</span></code></a> unsafe\nrequest, Django's CSRF protection requires that the request have a <code class=\"docutils literal notranslate\"><span class=\"pre\">Referer</span></code>\nheader that matches the origin present in the <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> header. This prevents,\nfor example, a <code class=\"docutils literal notranslate\"><span class=\"pre\">POST</span></code> request from <code class=\"docutils literal notranslate\"><span class=\"pre\">subdomain.example.com</span></code> from succeeding\nagainst <code class=\"docutils literal notranslate\"><span class=\"pre\">api.example.com</span></code>. If you need cross-origin unsafe requests over\nHTTPS, continuing the example, add <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;subdomain.example.com&quot;</span></code> to this list.\nThe setting also supports subdomains, so you could add <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;.example.com&quot;</span></code>, for\nexample, to allow access from all subdomains of <code class=\"docutils literal notranslate\"><span class=\"pre\">example.com</span></code>.</p>\n</section>\n<section id=\"databases\">\n<span id=\"std-setting-DATABASES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATABASES</span></code><a class=\"heading-anchor\" href=\"#databases\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (空の辞書)</p>\n<p>A dictionary containing the settings for all databases to be used with\nDjango. It is a nested dictionary whose contents map a database alias\nto a dictionary containing the options for an individual database.</p>\n<p>The <a class=\"reference internal\" href=\"#std-setting-DATABASES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATABASES</span></code></a> setting must configure a <code class=\"docutils literal notranslate\"><span class=\"pre\">default</span></code> database;\nany number of additional databases may also be specified.</p>\n<p>The simplest possible settings file is for a single-database setup using\nSQLite. This can be configured using the following:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">DATABASES</span> <span class=\"o\">=</span> <span class=\"p\">{</span>\n    <span class=\"s1\">&#39;default&#39;</span><span class=\"p\">:</span> <span class=\"p\">{</span>\n        <span class=\"s1\">&#39;ENGINE&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;django.db.backends.sqlite3&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;NAME&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;mydatabase&#39;</span><span class=\"p\">,</span>\n    <span class=\"p\">}</span>\n<span class=\"p\">}</span>\n</code></pre></div>\n<p>When connecting to other database backends, such as MariaDB, MySQL, Oracle, or\nPostgreSQL, additional connection parameters will be required. See\nthe <a class=\"reference internal\" href=\"#std-setting-DATABASE-ENGINE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ENGINE</span></code></a> setting below on how to specify\nother database types. This example is for PostgreSQL:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">DATABASES</span> <span class=\"o\">=</span> <span class=\"p\">{</span>\n    <span class=\"s1\">&#39;default&#39;</span><span class=\"p\">:</span> <span class=\"p\">{</span>\n        <span class=\"s1\">&#39;ENGINE&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;django.db.backends.postgresql&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;NAME&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;mydatabase&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;USER&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;mydatabaseuser&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;PASSWORD&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;mypassword&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;HOST&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;127.0.0.1&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;PORT&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;5432&#39;</span><span class=\"p\">,</span>\n    <span class=\"p\">}</span>\n<span class=\"p\">}</span>\n</code></pre></div>\n<p>The following inner options that may be required for more complex\nconfigurations are available:</p>\n<section id=\"atomic-requests\">\n<span id=\"std-setting-DATABASE-ATOMIC_REQUESTS\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">ATOMIC_REQUESTS</span></code><a class=\"heading-anchor\" href=\"#atomic-requests\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> to wrap each view in a transaction on this database. See\n<a class=\"reference internal\" href=\"/ja/3.1/topics/db/transactions/#tying-transactions-to-http-requests\"><span class=\"std std-ref\">HTTP リクエストにトランザクションを結びつける</span></a>.</p>\n</section>\n<section id=\"autocommit\">\n<span id=\"std-setting-DATABASE-AUTOCOMMIT\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">AUTOCOMMIT</span></code><a class=\"heading-anchor\" href=\"#autocommit\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code></p>\n<p>Set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> if you want to <a class=\"reference internal\" href=\"/ja/3.1/topics/db/transactions/#deactivate-transaction-management\"><span class=\"std std-ref\">disable Django's transaction\nmanagement</span></a> and implement your own.</p>\n</section>\n<section id=\"engine\">\n<span id=\"std-setting-DATABASE-ENGINE\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">ENGINE</span></code><a class=\"heading-anchor\" href=\"#engine\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>The database backend to use. The built-in database backends are:</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.db.backends.postgresql'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.db.backends.mysql'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.db.backends.sqlite3'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.db.backends.oracle'</span></code></p></li>\n</ul>\n<p>You can use a database backend that doesn't ship with Django by setting\n<code class=\"docutils literal notranslate\"><span class=\"pre\">ENGINE</span></code> to a fully-qualified path (i.e. <code class=\"docutils literal notranslate\"><span class=\"pre\">mypackage.backends.whatever</span></code>).</p>\n</section>\n<section id=\"host\">\n<span id=\"std-setting-HOST\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">HOST</span></code><a class=\"heading-anchor\" href=\"#host\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>Which host to use when connecting to the database. An empty string means\nlocalhost. Not used with SQLite.</p>\n<p>If this value starts with a forward slash (<code class=\"docutils literal notranslate\"><span class=\"pre\">'/'</span></code>) and you're using MySQL,\nMySQL will connect via a Unix socket to the specified socket. For example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"s2\">&quot;HOST&quot;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;/var/run/mysql&#39;</span>\n</code></pre></div>\n<p>If you're using MySQL and this value <em>doesn't</em> start with a forward slash, then\nthis value is assumed to be the host.</p>\n<p>If you're using PostgreSQL, by default (empty <a class=\"reference internal\" href=\"#std-setting-HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">HOST</span></code></a>), the connection\nto the database is done through UNIX domain sockets ('local' lines in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">pg_hba.conf</span></code>). If your UNIX domain socket is not in the standard location,\nuse the same value of <code class=\"docutils literal notranslate\"><span class=\"pre\">unix_socket_directory</span></code> from <code class=\"docutils literal notranslate\"><span class=\"pre\">postgresql.conf</span></code>.\nIf you want to connect through TCP sockets, set <a class=\"reference internal\" href=\"#std-setting-HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">HOST</span></code></a> to 'localhost'\nor '127.0.0.1' ('host' lines in <code class=\"docutils literal notranslate\"><span class=\"pre\">pg_hba.conf</span></code>).\nOn Windows, you should always define <a class=\"reference internal\" href=\"#std-setting-HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">HOST</span></code></a>, as UNIX domain sockets\nare not available.</p>\n</section>\n<section id=\"name\">\n<span id=\"std-setting-NAME\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">NAME</span></code><a class=\"heading-anchor\" href=\"#name\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>The name of the database to use. For SQLite, it's the full path to the database\nfile. When specifying the path, always use forward slashes, even on Windows\n(e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">C:/homes/user/mysite/sqlite3.db</span></code>).</p>\n</section>\n<section id=\"conn-max-age\">\n<span id=\"std-setting-CONN_MAX_AGE\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">CONN_MAX_AGE</span></code><a class=\"heading-anchor\" href=\"#conn-max-age\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code></p>\n<p>The lifetime of a database connection, as an integer of seconds. Use <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code> to\nclose database connections at the end of each request — Django's historical\nbehavior — and <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for unlimited persistent connections.</p>\n</section>\n<section id=\"std-setting-OPTIONS\">\n<span id=\"id2\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">OPTIONS</span></code><a class=\"heading-anchor\" href=\"#std-setting-OPTIONS\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (空の辞書)</p>\n<p>Extra parameters to use when connecting to the database. Available parameters\nvary depending on your database backend.</p>\n<p>Some information on available parameters can be found in the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/databases/\"><span class=\"doc\">Database Backends</span></a> documentation. For more information,\nconsult your backend module's own documentation.</p>\n</section>\n<section id=\"password\">\n<span id=\"std-setting-PASSWORD\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">PASSWORD</span></code><a class=\"heading-anchor\" href=\"#password\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>The password to use when connecting to the database. Not used with SQLite.</p>\n</section>\n<section id=\"port\">\n<span id=\"std-setting-PORT\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">PORT</span></code><a class=\"heading-anchor\" href=\"#port\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>The port to use when connecting to the database. An empty string means the\ndefault port. Not used with SQLite.</p>\n</section>\n<section id=\"time-zone\">\n<span id=\"std-setting-DATABASE-TIME_ZONE\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code><a class=\"heading-anchor\" href=\"#time-zone\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>A string representing the time zone for this database connection or <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>.\nThis inner option of the <a class=\"reference internal\" href=\"#std-setting-DATABASES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATABASES</span></code></a> setting accepts the same values\nas the general <a class=\"reference internal\" href=\"#std-setting-TIME_ZONE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code></a> setting.</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-USE_TZ\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> and this option is set, reading datetimes\nfrom the database returns aware datetimes in this time zone instead of UTC.\nWhen <a class=\"reference internal\" href=\"#std-setting-USE_TZ\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>, it is an error to set this option.</p>\n<ul>\n<li><p>If the database backend doesn't support time zones (e.g. SQLite, MySQL,\nOracle), Django reads and writes datetimes in local time according to this\noption if it is set and in UTC if it isn't.</p>\n<p>Changing the connection time zone changes how datetimes are read from and\nwritten to the database.</p>\n<ul class=\"simple\">\n<li><p>If Django manages the database and you don't have a strong reason to do\notherwise, you should leave this option unset. It's best to store datetimes\nin UTC because it avoids ambiguous or nonexistent datetimes during daylight\nsaving time changes. Also, receiving datetimes in UTC keeps datetime\narithmetic simple — there's no need for the <code class=\"docutils literal notranslate\"><span class=\"pre\">normalize()</span></code> method provided\nby pytz.</p></li>\n<li><p>If you're connecting to a third-party database that stores datetimes in a\nlocal time rather than UTC, then you must set this option to the\nappropriate time zone. Likewise, if Django manages the database but\nthird-party systems connect to the same database and expect to find\ndatetimes in local time, then you must set this option.</p></li>\n</ul>\n</li>\n<li><p>If the database backend supports time zones (e.g. PostgreSQL), the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code> option is very rarely needed. It can be changed at any time;\nthe database takes care of converting datetimes to the desired time zone.</p>\n<p>Setting the time zone of the database connection may be useful for running\nraw SQL queries involving date/time functions provided by the database, such\nas <code class=\"docutils literal notranslate\"><span class=\"pre\">date_trunc</span></code>, because their results depend on the time zone.</p>\n<p>However, this has a downside: receiving all datetimes in local time makes\ndatetime arithmetic more tricky — you must call the <code class=\"docutils literal notranslate\"><span class=\"pre\">normalize()</span></code> method\nprovided by pytz after each operation.</p>\n<p>Consider converting to local time explicitly with <code class=\"docutils literal notranslate\"><span class=\"pre\">AT</span> <span class=\"pre\">TIME</span> <span class=\"pre\">ZONE</span></code> in raw SQL\nqueries instead of setting the <code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code> option.</p>\n</li>\n</ul>\n<aside class=\"version-note version-changed\" data-version=\"3.1\">\n<p class=\"version-note-title\">Changed in Django 3.1</p><p>Using this option when the database backend supports time zones was allowed.</p>\n</aside>\n</section>\n<section id=\"disable-server-side-cursors\">\n<span id=\"std-setting-DATABASE-DISABLE_SERVER_SIDE_CURSORS\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">DISABLE_SERVER_SIDE_CURSORS</span></code><a class=\"heading-anchor\" href=\"#disable-server-side-cursors\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> if you want to disable the use of server-side cursors with\n<a class=\"reference internal\" href=\"/ja/3.1/ref/models/querysets/#django.db.models.query.QuerySet.iterator\" title=\"django.db.models.query.QuerySet.iterator\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">QuerySet.iterator()</span></code></a>. <a class=\"reference internal\" href=\"/ja/3.1/ref/databases/#transaction-pooling-server-side-cursors\"><span class=\"std std-ref\">Transaction pooling and server-side cursors</span></a>\ndescribes the use case.</p>\n<p>This is a PostgreSQL-specific setting.</p>\n</section>\n<section id=\"user\">\n<span id=\"std-setting-USER\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">USER</span></code><a class=\"heading-anchor\" href=\"#user\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>The username to use when connecting to the database. Not used with SQLite.</p>\n</section>\n<section id=\"test\">\n<span id=\"std-setting-DATABASE-TEST\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">TEST</span></code><a class=\"heading-anchor\" href=\"#test\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (空の辞書)</p>\n<p>A dictionary of settings for test databases; for more details about the\ncreation and use of test databases, see <a class=\"reference internal\" href=\"/ja/3.1/topics/testing/overview/#the-test-database\"><span class=\"std std-ref\">test データベース</span></a>.</p>\n<p>Here's an example with a test database configuration:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">DATABASES</span> <span class=\"o\">=</span> <span class=\"p\">{</span>\n    <span class=\"s1\">&#39;default&#39;</span><span class=\"p\">:</span> <span class=\"p\">{</span>\n        <span class=\"s1\">&#39;ENGINE&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;django.db.backends.postgresql&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;USER&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;mydatabaseuser&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;NAME&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;mydatabase&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;TEST&#39;</span><span class=\"p\">:</span> <span class=\"p\">{</span>\n            <span class=\"s1\">&#39;NAME&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;mytestdatabase&#39;</span><span class=\"p\">,</span>\n        <span class=\"p\">},</span>\n    <span class=\"p\">},</span>\n<span class=\"p\">}</span>\n</code></pre></div>\n<p>The following keys in the <code class=\"docutils literal notranslate\"><span class=\"pre\">TEST</span></code> dictionary are available:</p>\n<section id=\"charset\">\n<span id=\"std-setting-TEST_CHARSET\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">CHARSET</span></code><a class=\"heading-anchor\" href=\"#charset\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The character set encoding used to create the test database. The value of this\nstring is passed directly through to the database, so its format is\nbackend-specific.</p>\n<p>Supported by the <a class=\"reference external\" href=\"https://www.postgresql.org/docs/current/multibyte.html\">PostgreSQL</a> (<code class=\"docutils literal notranslate\"><span class=\"pre\">postgresql</span></code>) and <a class=\"reference external\" href=\"https://dev.mysql.com/doc/refman/en/charset-charsets.html\">MySQL</a> (<code class=\"docutils literal notranslate\"><span class=\"pre\">mysql</span></code>) backends.</p>\n</section>\n<section id=\"collation\">\n<span id=\"std-setting-TEST_COLLATION\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">COLLATION</span></code><a class=\"heading-anchor\" href=\"#collation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The collation order to use when creating the test database. This value is\npassed directly to the backend, so its format is backend-specific.</p>\n<p>Only supported for the <code class=\"docutils literal notranslate\"><span class=\"pre\">mysql</span></code> backend (see the <a class=\"reference external\" href=\"https://dev.mysql.com/doc/refman/en/charset-charsets.html\">MySQL manual</a> for details).</p>\n</section>\n<section id=\"dependencies\">\n<span id=\"std-setting-TEST_DEPENDENCIES\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DEPENDENCIES</span></code><a class=\"heading-anchor\" href=\"#dependencies\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">['default']</span></code>, for all databases other than <code class=\"docutils literal notranslate\"><span class=\"pre\">default</span></code>,\nwhich has no dependencies.</p>\n<p>The creation-order dependencies of the database. See the documentation\non <a class=\"reference internal\" href=\"/ja/3.1/topics/testing/advanced/#topics-testing-creation-dependencies\"><span class=\"std std-ref\">controlling the creation order of test databases</span></a> for details.</p>\n</section>\n<section id=\"migrate\">\n<span id=\"std-setting-TEST_MIGRATE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">MIGRATE</span></code><a class=\"heading-anchor\" href=\"#migrate\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<aside class=\"version-note version-added\" data-version=\"3.1\">\n<p class=\"version-note-title\">New in Django 3.1</p></aside>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code></p>\n<p>When set to <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>, migrations won't run when creating the test database.\nThis is similar to setting <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> as a value in <a class=\"reference internal\" href=\"#std-setting-MIGRATION_MODULES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIGRATION_MODULES</span></code></a>,\nbut for all apps.</p>\n</section>\n<section id=\"mirror\">\n<span id=\"std-setting-TEST_MIRROR\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">MIRROR</span></code><a class=\"heading-anchor\" href=\"#mirror\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The alias of the database that this database should mirror during\ntesting.</p>\n<p>This setting exists to allow for testing of primary/replica\n(referred to as master/slave by some databases)\nconfigurations of multiple databases. See the documentation on\n<a class=\"reference internal\" href=\"/ja/3.1/topics/testing/advanced/#topics-testing-primaryreplica\"><span class=\"std std-ref\">testing primary/replica configurations</span></a> for details.</p>\n</section>\n<section id=\"std-setting-TEST_NAME\">\n<span id=\"id3\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">NAME</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEST_NAME\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The name of database to use when running the test suite.</p>\n<p>If the default value (<code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>) is used with the SQLite database engine, the\ntests will use a memory resident database. For all other database engines the\ntest database will use the name <code class=\"docutils literal notranslate\"><span class=\"pre\">'test_'</span> <span class=\"pre\">+</span> <span class=\"pre\">DATABASE_NAME</span></code>.</p>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/topics/testing/overview/#the-test-database\"><span class=\"std std-ref\">test データベース</span></a>.</p>\n</section>\n<section id=\"serialize\">\n<span id=\"std-setting-TEST_SERIALIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">SERIALIZE</span></code><a class=\"heading-anchor\" href=\"#serialize\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Boolean value to control whether or not the default test runner serializes the\ndatabase into an in-memory JSON string before running tests (used to restore\nthe database state between tests if you don't have transactions). You can set\nthis to <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> to speed up creation time if you don't have any test classes\nwith <a class=\"reference internal\" href=\"/ja/3.1/topics/testing/overview/#test-case-serialized-rollback\"><span class=\"std std-ref\">serialized_rollback=True</span></a>.</p>\n</section>\n<section id=\"template\">\n<span id=\"std-setting-TEST_TEMPLATE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">TEMPLATE</span></code><a class=\"heading-anchor\" href=\"#template\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>This is a PostgreSQL-specific setting.</p>\n<p>The name of a <a class=\"reference external\" href=\"https://www.postgresql.org/docs/current/sql-createdatabase.html\">template</a> (e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">'template0'</span></code>) from which to create the test\ndatabase.</p>\n</section>\n<section id=\"create-db\">\n<span id=\"std-setting-TEST_CREATE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">CREATE_DB</span></code><a class=\"heading-anchor\" href=\"#create-db\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>If it is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>, the test tablespaces won't be automatically created\nat the beginning of the tests or dropped at the end.</p>\n</section>\n<section id=\"create-user\">\n<span id=\"std-setting-TEST_USER_CREATE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">CREATE_USER</span></code><a class=\"heading-anchor\" href=\"#create-user\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>If it is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>, the test user won't be automatically created at the\nbeginning of the tests and dropped at the end.</p>\n</section>\n<section id=\"std-setting-TEST_USER\">\n<span id=\"id5\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">USER</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEST_USER\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The username to use when connecting to the Oracle database that will be used\nwhen running tests. If not provided, Django will use <code class=\"docutils literal notranslate\"><span class=\"pre\">'test_'</span> <span class=\"pre\">+</span> <span class=\"pre\">USER</span></code>.</p>\n</section>\n<section id=\"std-setting-TEST_PASSWD\">\n<span id=\"id6\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">PASSWORD</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEST_PASSWD\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The password to use when connecting to the Oracle database that will be used\nwhen running tests. If not provided, Django will generate a random password.</p>\n</section>\n<section id=\"oracle-managed-files\">\n<span id=\"std-setting-TEST_ORACLE_MANAGED_FILES\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">ORACLE_MANAGED_FILES</span></code><a class=\"heading-anchor\" href=\"#oracle-managed-files\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>If set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, Oracle Managed Files (OMF) tablespaces will be used.\n<a class=\"reference internal\" href=\"#std-setting-DATAFILE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATAFILE</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-DATAFILE_TMP\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATAFILE_TMP</span></code></a> will be ignored.</p>\n</section>\n<section id=\"tblspace\">\n<span id=\"std-setting-TEST_TBLSPACE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">TBLSPACE</span></code><a class=\"heading-anchor\" href=\"#tblspace\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The name of the tablespace that will be used when running tests. If not\nprovided, Django will use <code class=\"docutils literal notranslate\"><span class=\"pre\">'test_'</span> <span class=\"pre\">+</span> <span class=\"pre\">USER</span></code>.</p>\n</section>\n<section id=\"tblspace-tmp\">\n<span id=\"std-setting-TEST_TBLSPACE_TMP\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">TBLSPACE_TMP</span></code><a class=\"heading-anchor\" href=\"#tblspace-tmp\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The name of the temporary tablespace that will be used when running tests. If\nnot provided, Django will use <code class=\"docutils literal notranslate\"><span class=\"pre\">'test_'</span> <span class=\"pre\">+</span> <span class=\"pre\">USER</span> <span class=\"pre\">+</span> <span class=\"pre\">'_temp'</span></code>.</p>\n</section>\n<section id=\"datafile\">\n<span id=\"std-setting-DATAFILE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE</span></code><a class=\"heading-anchor\" href=\"#datafile\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The name of the datafile to use for the TBLSPACE. If not provided, Django will\nuse <code class=\"docutils literal notranslate\"><span class=\"pre\">TBLSPACE</span> <span class=\"pre\">+</span> <span class=\"pre\">'.dbf'</span></code>.</p>\n</section>\n<section id=\"datafile-tmp\">\n<span id=\"std-setting-DATAFILE_TMP\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_TMP</span></code><a class=\"heading-anchor\" href=\"#datafile-tmp\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The name of the datafile to use for the TBLSPACE_TMP. If not provided, Django\nwill use <code class=\"docutils literal notranslate\"><span class=\"pre\">TBLSPACE_TMP</span> <span class=\"pre\">+</span> <span class=\"pre\">'.dbf'</span></code>.</p>\n</section>\n<section id=\"datafile-maxsize\">\n<span id=\"std-setting-DATAFILE_MAXSIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_MAXSIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-maxsize\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'500M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The maximum size that the DATAFILE is allowed to grow to.</p>\n</section>\n<section id=\"datafile-tmp-maxsize\">\n<span id=\"std-setting-DATAFILE_TMP_MAXSIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_TMP_MAXSIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-tmp-maxsize\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'500M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The maximum size that the DATAFILE_TMP is allowed to grow to.</p>\n</section>\n<section id=\"datafile-size\">\n<span id=\"std-setting-DATAFILE_SIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_SIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-size\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'50M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The initial size of the DATAFILE.</p>\n</section>\n<section id=\"datafile-tmp-size\">\n<span id=\"std-setting-DATAFILE_TMP_SIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_TMP_SIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-tmp-size\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'50M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The initial size of the DATAFILE_TMP.</p>\n</section>\n<section id=\"datafile-extsize\">\n<span id=\"std-setting-DATAFILE_EXTSIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_EXTSIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-extsize\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'25M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The amount by which the DATAFILE is extended when more space is required.</p>\n</section>\n<section id=\"datafile-tmp-extsize\">\n<span id=\"std-setting-DATAFILE_TMP_EXTSIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_TMP_EXTSIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-tmp-extsize\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'25M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The amount by which the DATAFILE_TMP is extended when more space is required.</p>\n</section>\n</section>\n</section>\n<section id=\"data-upload-max-memory-size\">\n<span id=\"std-setting-DATA_UPLOAD_MAX_MEMORY_SIZE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATA_UPLOAD_MAX_MEMORY_SIZE</span></code><a class=\"heading-anchor\" href=\"#data-upload-max-memory-size\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">2621440</span></code> (例: 2.5 MB)。</p>\n<p>The maximum size in bytes that a request body may be before a\n<a class=\"reference internal\" href=\"/ja/3.1/ref/exceptions/#django.core.exceptions.SuspiciousOperation\" title=\"django.core.exceptions.SuspiciousOperation\"><code class=\"xref py py-exc docutils literal notranslate\"><span class=\"pre\">SuspiciousOperation</span></code></a> (<code class=\"docutils literal notranslate\"><span class=\"pre\">RequestDataTooBig</span></code>) is\nraised. The check is done when accessing <code class=\"docutils literal notranslate\"><span class=\"pre\">request.body</span></code> or <code class=\"docutils literal notranslate\"><span class=\"pre\">request.POST</span></code>\nand is calculated against the total request size excluding any file upload\ndata. You can set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> to disable the check. Applications that are\nexpected to receive unusually large form posts should tune this setting.</p>\n<p>The amount of request data is correlated to the amount of memory needed to\nprocess the request and populate the GET and POST dictionaries. Large requests\ncould be used as a denial-of-service attack vector if left unchecked. Since web\nservers don't typically perform deep request inspection, it's not possible to\nperform a similar check at that level.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_MAX_MEMORY_SIZE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_MAX_MEMORY_SIZE</span></code></a>.</p>\n</section>\n<section id=\"data-upload-max-number-fields\">\n<span id=\"std-setting-DATA_UPLOAD_MAX_NUMBER_FIELDS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATA_UPLOAD_MAX_NUMBER_FIELDS</span></code><a class=\"heading-anchor\" href=\"#data-upload-max-number-fields\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">1000</span></code></p>\n<p>The maximum number of parameters that may be received via GET or POST before a\n<a class=\"reference internal\" href=\"/ja/3.1/ref/exceptions/#django.core.exceptions.SuspiciousOperation\" title=\"django.core.exceptions.SuspiciousOperation\"><code class=\"xref py py-exc docutils literal notranslate\"><span class=\"pre\">SuspiciousOperation</span></code></a> (<code class=\"docutils literal notranslate\"><span class=\"pre\">TooManyFields</span></code>) is\nraised. You can set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> to disable the check. Applications that\nare expected to receive an unusually large number of form fields should tune\nthis setting.</p>\n<p>The number of request parameters is correlated to the amount of time needed to\nprocess the request and populate the GET and POST dictionaries. Large requests\ncould be used as a denial-of-service attack vector if left unchecked. Since web\nservers don't typically perform deep request inspection, it's not possible to\nperform a similar check at that level.</p>\n</section>\n<section id=\"database-routers\">\n<span id=\"std-setting-DATABASE_ROUTERS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATABASE_ROUTERS</span></code><a class=\"heading-anchor\" href=\"#database-routers\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>The list of routers that will be used to determine which database\nto use when performing a database query.</p>\n<p>See the documentation on <a class=\"reference internal\" href=\"/ja/3.1/topics/db/multi-db/#topics-db-multi-db-routing\"><span class=\"std std-ref\">automatic database routing in multi\ndatabase configurations</span></a>.</p>\n</section>\n<section id=\"date-format\">\n<span id=\"std-setting-DATE_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code><a class=\"heading-anchor\" href=\"#date-format\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'N</span> <span class=\"pre\">j,</span> <span class=\"pre\">Y'</span></code> (例: <code class=\"docutils literal notranslate\"><span class=\"pre\">Feb.</span> <span class=\"pre\">4,</span> <span class=\"pre\">2003</span></code>)</p>\n<p>The default formatting to use for displaying date fields in any part of the\nsystem. Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the\nlocale-dictated format has higher precedence and will be applied instead. See\n<a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-SHORT_DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"date-input-formats\">\n<span id=\"std-setting-DATE_INPUT_FORMATS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code><a class=\"heading-anchor\" href=\"#date-input-formats\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[</span>\n    <span class=\"s1\">&#39;%Y-%m-</span><span class=\"si\">%d</span><span class=\"s1\">&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%Y&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%y&#39;</span><span class=\"p\">,</span> <span class=\"c1\"># &#39;2006-10-25&#39;, &#39;10/25/2006&#39;, &#39;10/25/06&#39;</span>\n    <span class=\"s1\">&#39;%b </span><span class=\"si\">%d</span><span class=\"s1\"> %Y&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;%b </span><span class=\"si\">%d</span><span class=\"s1\">, %Y&#39;</span><span class=\"p\">,</span>            <span class=\"c1\"># &#39;Oct 25 2006&#39;, &#39;Oct 25, 2006&#39;</span>\n    <span class=\"s1\">&#39;</span><span class=\"si\">%d</span><span class=\"s1\"> %b %Y&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;</span><span class=\"si\">%d</span><span class=\"s1\"> %b, %Y&#39;</span><span class=\"p\">,</span>            <span class=\"c1\"># &#39;25 Oct 2006&#39;, &#39;25 Oct, 2006&#39;</span>\n    <span class=\"s1\">&#39;%B </span><span class=\"si\">%d</span><span class=\"s1\"> %Y&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;%B </span><span class=\"si\">%d</span><span class=\"s1\">, %Y&#39;</span><span class=\"p\">,</span>            <span class=\"c1\"># &#39;October 25 2006&#39;, &#39;October 25, 2006&#39;</span>\n    <span class=\"s1\">&#39;</span><span class=\"si\">%d</span><span class=\"s1\"> %B %Y&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;</span><span class=\"si\">%d</span><span class=\"s1\"> %B, %Y&#39;</span><span class=\"p\">,</span>            <span class=\"c1\"># &#39;25 October 2006&#39;, &#39;25 October, 2006&#39;</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>A list of formats that will be accepted when inputting data on a date field.\nFormats will be tried in order, using the first valid one. Note that these\nformat strings use Python's <a class=\"reference external\" href=\"https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior\" title=\"(in Python v3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">date</span></code></a>\ntemplate filter.</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the locale-dictated format has higher\nprecedence and will be applied instead.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATETIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_INPUT_FORMATS</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-TIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_INPUT_FORMATS</span></code></a>.</p>\n</section>\n<section id=\"datetime-format\">\n<span id=\"std-setting-DATETIME_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code><a class=\"heading-anchor\" href=\"#datetime-format\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'N</span> <span class=\"pre\">j,</span> <span class=\"pre\">Y,</span> <span class=\"pre\">P'</span></code> (例: <code class=\"docutils literal notranslate\"><span class=\"pre\">Feb.</span> <span class=\"pre\">4,</span> <span class=\"pre\">2003,</span> <span class=\"pre\">4</span> <span class=\"pre\">p.m.</span></code>)</p>\n<p>The default formatting to use for displaying datetime fields in any part of the\nsystem. Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the\nlocale-dictated format has higher precedence and will be applied instead. See\n<a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-SHORT_DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATETIME_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"datetime-input-formats\">\n<span id=\"std-setting-DATETIME_INPUT_FORMATS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATETIME_INPUT_FORMATS</span></code><a class=\"heading-anchor\" href=\"#datetime-input-formats\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[</span>\n    <span class=\"s1\">&#39;%Y-%m-</span><span class=\"si\">%d</span><span class=\"s1\"> %H:%M:%S&#39;</span><span class=\"p\">,</span>     <span class=\"c1\"># &#39;2006-10-25 14:30:59&#39;</span>\n    <span class=\"s1\">&#39;%Y-%m-</span><span class=\"si\">%d</span><span class=\"s1\"> %H:%M:%S.</span><span class=\"si\">%f</span><span class=\"s1\">&#39;</span><span class=\"p\">,</span>  <span class=\"c1\"># &#39;2006-10-25 14:30:59.000200&#39;</span>\n    <span class=\"s1\">&#39;%Y-%m-</span><span class=\"si\">%d</span><span class=\"s1\"> %H:%M&#39;</span><span class=\"p\">,</span>        <span class=\"c1\"># &#39;2006-10-25 14:30&#39;</span>\n    <span class=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%Y %H:%M:%S&#39;</span><span class=\"p\">,</span>     <span class=\"c1\"># &#39;10/25/2006 14:30:59&#39;</span>\n    <span class=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%Y %H:%M:%S.</span><span class=\"si\">%f</span><span class=\"s1\">&#39;</span><span class=\"p\">,</span>  <span class=\"c1\"># &#39;10/25/2006 14:30:59.000200&#39;</span>\n    <span class=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%Y %H:%M&#39;</span><span class=\"p\">,</span>        <span class=\"c1\"># &#39;10/25/2006 14:30&#39;</span>\n    <span class=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%y %H:%M:%S&#39;</span><span class=\"p\">,</span>     <span class=\"c1\"># &#39;10/25/06 14:30:59&#39;</span>\n    <span class=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%y %H:%M:%S.</span><span class=\"si\">%f</span><span class=\"s1\">&#39;</span><span class=\"p\">,</span>  <span class=\"c1\"># &#39;10/25/06 14:30:59.000200&#39;</span>\n    <span class=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%y %H:%M&#39;</span><span class=\"p\">,</span>        <span class=\"c1\"># &#39;10/25/06 14:30&#39;</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>A list of formats that will be accepted when inputting data on a datetime\nfield. Formats will be tried in order, using the first valid one. Note that\nthese format strings use Python's <a class=\"reference external\" href=\"https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior\" title=\"(in Python v3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">date</span></code></a>\ntemplate filter. Date-only formats are not included as datetime fields will\nautomatically try <a class=\"reference internal\" href=\"#std-setting-DATE_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code></a> in last resort.</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the locale-dictated format has higher\nprecedence and will be applied instead.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-TIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_INPUT_FORMATS</span></code></a>.</p>\n<aside class=\"version-note version-changed\" data-version=\"3.1\">\n<p class=\"version-note-title\">Changed in Django 3.1</p><p>In older versions, the default is a list containing also date-only formats.</p>\n</aside>\n</section>\n<section id=\"debug\">\n<span id=\"std-setting-DEBUG\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code><a class=\"heading-anchor\" href=\"#debug\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>A boolean that turns on/off debug mode.</p>\n<p>Never deploy a site into production with <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> turned on.</p>\n<p>One of the main features of debug mode is the display of detailed error pages.\nIf your app raises an exception when <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, Django will\ndisplay a detailed traceback, including a lot of metadata about your\nenvironment, such as all the currently defined Django settings (from\n<code class=\"docutils literal notranslate\"><span class=\"pre\">settings.py</span></code>).</p>\n<p>As a security measure, Django will <em>not</em> include settings that might be\nsensitive, such as <a class=\"reference internal\" href=\"#std-setting-SECRET_KEY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code></a>. Specifically, it will exclude any\nsetting whose name includes any of the following:</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'API'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'KEY'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'PASS'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'SECRET'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'SIGNATURE'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'TOKEN'</span></code></p></li>\n</ul>\n<p>Note that these are <em>partial</em> matches. <code class=\"docutils literal notranslate\"><span class=\"pre\">'PASS'</span></code> will also match PASSWORD,\njust as <code class=\"docutils literal notranslate\"><span class=\"pre\">'TOKEN'</span></code> will also match TOKENIZED and so on.</p>\n<p>Still, note that there are always going to be sections of your debug output\nthat are inappropriate for public consumption. File paths, configuration\noptions and the like all give attackers extra information about your server.</p>\n<p>It is also important to remember that when running with <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a>\nturned on, Django will remember every SQL query it executes. This is useful\nwhen you're debugging, but it'll rapidly consume memory on a production server.</p>\n<p>Finally, if <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>, you also need to properly set\nthe <a class=\"reference internal\" href=\"#std-setting-ALLOWED_HOSTS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code></a> setting. Failing to do so will result in all\nrequests being returned as &quot;Bad Request (400)&quot;.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>The default <code class=\"file docutils literal notranslate\"><span class=\"pre\">settings.py</span></code> file created by <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> sets <code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code> for convenience.</p>\n</aside>\n</section>\n<section id=\"debug-propagate-exceptions\">\n<span id=\"std-setting-DEBUG_PROPAGATE_EXCEPTIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG_PROPAGATE_EXCEPTIONS</span></code><a class=\"heading-anchor\" href=\"#debug-propagate-exceptions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>If set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, Django's exception handling of view functions\n(<a class=\"reference internal\" href=\"/ja/3.1/ref/urls/#django.conf.urls.handler500\" title=\"django.conf.urls.handler500\"><code class=\"xref py py-data docutils literal notranslate\"><span class=\"pre\">handler500</span></code></a>, or the debug view if <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a>\nis <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>) and logging of 500 responses (<a class=\"reference internal\" href=\"/ja/3.1/topics/logging/#django-request-logger\"><span class=\"std std-ref\">django.request</span></a>) is\nskipped and exceptions propagate upwards.</p>\n<p>This can be useful for some test setups. It shouldn't be used on a live site\nunless you want your web server (instead of Django) to generate &quot;Internal\nServer Error&quot; responses. In that case, make sure your server doesn't show the\nstack trace or other sensitive information in the response.</p>\n</section>\n<section id=\"decimal-separator\">\n<span id=\"std-setting-DECIMAL_SEPARATOR\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DECIMAL_SEPARATOR</span></code><a class=\"heading-anchor\" href=\"#decimal-separator\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'.'</span></code> (ドット)</p>\n<p>Default decimal separator used when formatting decimal numbers.</p>\n<p>Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the locale-dictated\nformat has higher precedence and will be applied instead.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a> and\n<a class=\"reference internal\" href=\"#std-setting-USE_THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_THOUSAND_SEPARATOR</span></code></a>.</p>\n</section>\n<section id=\"default-charset\">\n<span id=\"std-setting-DEFAULT_CHARSET\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_CHARSET</span></code><a class=\"heading-anchor\" href=\"#default-charset\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'utf-8'</span></code></p>\n<p>Default charset to use for all <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpResponse</span></code> objects, if a MIME type isn't\nmanually specified. Used when constructing the <code class=\"docutils literal notranslate\"><span class=\"pre\">Content-Type</span></code> header.</p>\n</section>\n<section id=\"default-exception-reporter\">\n<span id=\"std-setting-DEFAULT_EXCEPTION_REPORTER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_EXCEPTION_REPORTER</span></code><a class=\"heading-anchor\" href=\"#default-exception-reporter\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"3.1\">\n<p class=\"version-note-title\">New in Django 3.1</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/ja/3.1/howto/error-reporting/#django.views.debug.ExceptionReporter\" title=\"django.views.debug.ExceptionReporter\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.views.debug.ExceptionReporter</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>Default exception reporter class to be used if none has been assigned to the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/request-response/#django.http.HttpRequest\" title=\"django.http.HttpRequest\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">HttpRequest</span></code></a> instance yet. See\n<a class=\"reference internal\" href=\"/ja/3.1/howto/error-reporting/#custom-error-reports\"><span class=\"std std-ref\">Custom error reports</span></a>.</p>\n</section>\n<section id=\"default-exception-reporter-filter\">\n<span id=\"std-setting-DEFAULT_EXCEPTION_REPORTER_FILTER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_EXCEPTION_REPORTER_FILTER</span></code><a class=\"heading-anchor\" href=\"#default-exception-reporter-filter\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/ja/3.1/howto/error-reporting/#django.views.debug.SafeExceptionReporterFilter\" title=\"django.views.debug.SafeExceptionReporterFilter\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.views.debug.SafeExceptionReporterFilter</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>Default exception reporter filter class to be used if none has been assigned to\nthe <a class=\"reference internal\" href=\"/ja/3.1/ref/request-response/#django.http.HttpRequest\" title=\"django.http.HttpRequest\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">HttpRequest</span></code></a> instance yet.\nSee <a class=\"reference internal\" href=\"/ja/3.1/howto/error-reporting/#filtering-error-reports\"><span class=\"std std-ref\">Filtering error reports</span></a>.</p>\n</section>\n<section id=\"default-file-storage\">\n<span id=\"std-setting-DEFAULT_FILE_STORAGE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_FILE_STORAGE</span></code><a class=\"heading-anchor\" href=\"#default-file-storage\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/ja/3.1/ref/files/storage/#django.core.files.storage.FileSystemStorage\" title=\"django.core.files.storage.FileSystemStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.core.files.storage.FileSystemStorage</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>Default file storage class to be used for any file-related operations that don't\nspecify a particular storage system. See <a class=\"reference internal\" href=\"/ja/3.1/topics/files/\"><span class=\"doc\">ファイルの管理</span></a>.</p>\n</section>\n<section id=\"default-from-email\">\n<span id=\"std-setting-DEFAULT_FROM_EMAIL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_FROM_EMAIL</span></code><a class=\"heading-anchor\" href=\"#default-from-email\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'webmaster&#64;localhost'</span></code></p>\n<p>Default email address to use for various automated correspondence from the\nsite manager(s). This doesn't include error messages sent to <a class=\"reference internal\" href=\"#std-setting-ADMINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code></a>\nand <a class=\"reference internal\" href=\"#std-setting-MANAGERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code></a>; for that, see <a class=\"reference internal\" href=\"#std-setting-SERVER_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SERVER_EMAIL</span></code></a>.</p>\n</section>\n<section id=\"default-hashing-algorithm\">\n<span id=\"std-setting-DEFAULT_HASHING_ALGORITHM\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_HASHING_ALGORITHM</span></code><a class=\"heading-anchor\" href=\"#default-hashing-algorithm\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"3.1\">\n<p class=\"version-note-title\">New in Django 3.1</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'sha256'</span></code></p>\n<p>Default hashing algorithm to use for encoding cookies, password reset tokens in\nthe admin site, user sessions, and signatures created by\n<a class=\"reference internal\" href=\"/ja/3.1/topics/signing/#django.core.signing.Signer\" title=\"django.core.signing.Signer\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.core.signing.Signer</span></code></a> and <a class=\"reference internal\" href=\"/ja/3.1/topics/signing/#django.core.signing.dumps\" title=\"django.core.signing.dumps\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">django.core.signing.dumps()</span></code></a>.\nAlgorithm must be <code class=\"docutils literal notranslate\"><span class=\"pre\">'sha1'</span></code> or <code class=\"docutils literal notranslate\"><span class=\"pre\">'sha256'</span></code>. See\n<a class=\"reference internal\" href=\"/ja/3.1/releases/3.1/#default-hashing-algorithm-usage\"><span class=\"std std-ref\">release notes</span></a> for usage details.</p>\n<aside class=\"version-note version-deprecated\" data-version=\"3.1\">\n<p class=\"version-note-title\">Deprecated since Django 3.1</p><p><span class=\"versionmodified deprecated\">バージョン 3.1 で非推奨: </span>This transitional setting is deprecated. Support for it and tokens,\ncookies, sessions, and signatures that use SHA-1 hashing algorithm will be\nremoved in Django 4.0.</p>\n</aside>\n</section>\n<section id=\"default-index-tablespace\">\n<span id=\"std-setting-DEFAULT_INDEX_TABLESPACE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_INDEX_TABLESPACE</span></code><a class=\"heading-anchor\" href=\"#default-index-tablespace\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>Default tablespace to use for indexes on fields that don't specify\none, if the backend supports it (see <a class=\"reference internal\" href=\"/ja/3.1/topics/db/tablespaces/\"><span class=\"doc\">Tablespaces</span></a>).</p>\n</section>\n<section id=\"default-tablespace\">\n<span id=\"std-setting-DEFAULT_TABLESPACE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_TABLESPACE</span></code><a class=\"heading-anchor\" href=\"#default-tablespace\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>Default tablespace to use for models that don't specify one, if the\nbackend supports it (see <a class=\"reference internal\" href=\"/ja/3.1/topics/db/tablespaces/\"><span class=\"doc\">Tablespaces</span></a>).</p>\n</section>\n<section id=\"disallowed-user-agents\">\n<span id=\"std-setting-DISALLOWED_USER_AGENTS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DISALLOWED_USER_AGENTS</span></code><a class=\"heading-anchor\" href=\"#disallowed-user-agents\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>List of compiled regular expression objects representing User-Agent strings\nthat are not allowed to visit any page, systemwide. Use this for bots/crawlers.\nThis is only used if <code class=\"docutils literal notranslate\"><span class=\"pre\">CommonMiddleware</span></code> is installed (see\n<a class=\"reference internal\" href=\"/ja/3.1/topics/http/middleware/\"><span class=\"doc\">ミドルウェア (Middleware)</span></a>).</p>\n</section>\n<section id=\"email-backend\">\n<span id=\"std-setting-EMAIL_BACKEND\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_BACKEND</span></code><a class=\"heading-anchor\" href=\"#email-backend\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/ja/3.1/topics/email/#django.core.mail.backends.smtp.EmailBackend\" title=\"django.core.mail.backends.smtp.EmailBackend\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.core.mail.backends.smtp.EmailBackend</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>E メール送信に使われるバックエンドです。利用可能なバックエンドのリストは <a class=\"reference internal\" href=\"/ja/3.1/topics/email/\"><span class=\"doc\">メールを送信する</span></a> を参照してください。</p>\n</section>\n<section id=\"email-file-path\">\n<span id=\"std-setting-EMAIL_FILE_PATH\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_FILE_PATH</span></code><a class=\"heading-anchor\" href=\"#email-file-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: 定義されていません</p>\n<p>The directory used by the <a class=\"reference internal\" href=\"/ja/3.1/topics/email/#topic-email-file-backend\"><span class=\"std std-ref\">file email backend</span></a>\nto store output files.</p>\n<aside class=\"version-note version-changed\" data-version=\"3.1\">\n<p class=\"version-note-title\">Changed in Django 3.1</p><p>Support for <a class=\"reference external\" href=\"https://docs.python.org/3/library/pathlib.html#pathlib.Path\" title=\"(in Python v3.14)\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">pathlib.Path</span></code></a> was added.</p>\n</aside>\n</section>\n<section id=\"email-host\">\n<span id=\"std-setting-EMAIL_HOST\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST</span></code><a class=\"heading-anchor\" href=\"#email-host\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'localhost'</span></code></p>\n<p>E メール送信に使われるホストです。</p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_PORT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_PORT</span></code></a> も参照してください。</p>\n</section>\n<section id=\"email-host-password\">\n<span id=\"std-setting-EMAIL_HOST_PASSWORD\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_PASSWORD</span></code><a class=\"heading-anchor\" href=\"#email-host-password\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST</span></code></a> 内で定義された SMTP サーバで使われるパスワードです。この設定は、STMP サーバへの認証の際に <a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST_USER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_USER</span></code></a> と組み合わせて用いられます。どちらかの設定が空の場合、Django は認証を試みません。</p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST_USER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_USER</span></code></a> も参照してください。</p>\n</section>\n<section id=\"email-host-user\">\n<span id=\"std-setting-EMAIL_HOST_USER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_USER</span></code><a class=\"heading-anchor\" href=\"#email-host-user\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST</span></code></a> 内で定義された SMTP サーバで使われるユーザ名です。空の場合、Django は認証を試みません。</p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST_PASSWORD\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_PASSWORD</span></code></a> も参照してください。</p>\n</section>\n<section id=\"email-port\">\n<span id=\"std-setting-EMAIL_PORT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_PORT</span></code><a class=\"heading-anchor\" href=\"#email-port\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">25</span></code></p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST</span></code></a> 内で定義された SMTP サーバで使われるポート番号です。</p>\n</section>\n<section id=\"email-subject-prefix\">\n<span id=\"std-setting-EMAIL_SUBJECT_PREFIX\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_SUBJECT_PREFIX</span></code><a class=\"heading-anchor\" href=\"#email-subject-prefix\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'[Django]</span> <span class=\"pre\">'</span></code></p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">django.core.mail.mail_admins</span></code> や <code class=\"docutils literal notranslate\"><span class=\"pre\">django.core.mail.mail_managers</span></code> で送信される E メールメッセージ用の表題行のプレフィックスです。最後の文字はスペースにするのが良いでしょう。</p>\n</section>\n<section id=\"email-use-localtime\">\n<span id=\"std-setting-EMAIL_USE_LOCALTIME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_LOCALTIME</span></code><a class=\"heading-anchor\" href=\"#email-use-localtime\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to send the SMTP <code class=\"docutils literal notranslate\"><span class=\"pre\">Date</span></code> header of email messages in the local time\nzone (<code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>) or in UTC (<code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>).</p>\n</section>\n<section id=\"email-use-tls\">\n<span id=\"std-setting-EMAIL_USE_TLS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_TLS</span></code><a class=\"heading-anchor\" href=\"#email-use-tls\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>SMTP サーバと通信する際に TLS (セキュア) 接続を使うかどうかです。明示的な TLS 接続に使われ、通常はポート 587 で行われます。接続がハングしてしまう場合は、暗黙的な TLS を示す <a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_SSL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_SSL</span></code></a> を確認してみてください。</p>\n</section>\n<section id=\"email-use-ssl\">\n<span id=\"std-setting-EMAIL_USE_SSL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_SSL</span></code><a class=\"heading-anchor\" href=\"#email-use-ssl\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>SMTP サーバと通信する際に TLS (セキュア) 接続を使うかどうかです。ほとんどの E メールのドキュメントでは、この TLS 接続のタイプは SSL として参照されます。通常はポート 465 が使われます。接続がハングしてしまう場合は、暗黙的な TLS を示す <a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_TLS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_TLS</span></code></a> を確認してみてください。</p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_TLS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_TLS</span></code></a>/<a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_SSL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_SSL</span></code></a> は相互に排他的であることに注意してください。したがって、どちらか一方だけを <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> にセットしてください。</p>\n</section>\n<section id=\"email-ssl-certfile\">\n<span id=\"std-setting-EMAIL_SSL_CERTFILE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_SSL_CERTFILE</span></code><a class=\"heading-anchor\" href=\"#email-ssl-certfile\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_SSL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_SSL</span></code></a> ないし <a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_TLS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_TLS</span></code></a> が <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> の場合、オプションで、SSL 接続用に使う PEM フォーマットの証明書チェーンファイルを指定することができます。</p>\n</section>\n<section id=\"email-ssl-keyfile\">\n<span id=\"std-setting-EMAIL_SSL_KEYFILE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_SSL_KEYFILE</span></code><a class=\"heading-anchor\" href=\"#email-ssl-keyfile\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p><a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_SSL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_SSL</span></code></a> ないし <a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_TLS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_TLS</span></code></a> が <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> の場合、オプションで、SSL 接続用に使う PEM フォーマットのプライベートキーファイルを指定することができます。</p>\n<p>設定 <a class=\"reference internal\" href=\"#std-setting-EMAIL_SSL_CERTFILE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_SSL_CERTFILE</span></code></a> と <a class=\"reference internal\" href=\"#std-setting-EMAIL_SSL_KEYFILE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_SSL_KEYFILE</span></code></a> は証明書チェックには使われません。これらは元の SSL 接続に渡されます。証明書チェーンファイルとプライベートキーファイルがどのように処理されるかについての詳細は、パイソンの <code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">python:ssl.wrap_socket()</span></code> 関数のドキュメントを参照してください。</p>\n</section>\n<section id=\"email-timeout\">\n<span id=\"std-setting-EMAIL_TIMEOUT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_TIMEOUT</span></code><a class=\"heading-anchor\" href=\"#email-timeout\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>接続試行のような操作をブロックするためのタイムアウトを秒で指定します。</p>\n</section>\n<section id=\"file-upload-handlers\">\n<span id=\"std-setting-FILE_UPLOAD_HANDLERS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_HANDLERS</span></code><a class=\"heading-anchor\" href=\"#file-upload-handlers\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[</span>\n    <span class=\"s1\">&#39;django.core.files.uploadhandler.MemoryFileUploadHandler&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.core.files.uploadhandler.TemporaryFileUploadHandler&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>A list of handlers to use for uploading. Changing this setting allows complete\ncustomization -- even replacement -- of Django's upload process.</p>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/topics/files/\"><span class=\"doc\">ファイルの管理</span></a> for details.</p>\n</section>\n<section id=\"file-upload-max-memory-size\">\n<span id=\"std-setting-FILE_UPLOAD_MAX_MEMORY_SIZE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_MAX_MEMORY_SIZE</span></code><a class=\"heading-anchor\" href=\"#file-upload-max-memory-size\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">2621440</span></code> (例: 2.5 MB)。</p>\n<p>The maximum size (in bytes) that an upload will be before it gets streamed to\nthe file system. See <a class=\"reference internal\" href=\"/ja/3.1/topics/files/\"><span class=\"doc\">ファイルの管理</span></a> for details.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATA_UPLOAD_MAX_MEMORY_SIZE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATA_UPLOAD_MAX_MEMORY_SIZE</span></code></a>.</p>\n</section>\n<section id=\"file-upload-directory-permissions\">\n<span id=\"std-setting-FILE_UPLOAD_DIRECTORY_PERMISSIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_DIRECTORY_PERMISSIONS</span></code><a class=\"heading-anchor\" href=\"#file-upload-directory-permissions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The numeric mode to apply to directories created in the process of uploading\nfiles.</p>\n<p>This setting also determines the default permissions for collected static\ndirectories when using the <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command. See\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> for details on overriding it.</p>\n<p>This value mirrors the functionality and caveats of the\n<a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_PERMISSIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_PERMISSIONS</span></code></a> setting.</p>\n</section>\n<section id=\"file-upload-permissions\">\n<span id=\"std-setting-FILE_UPLOAD_PERMISSIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_PERMISSIONS</span></code><a class=\"heading-anchor\" href=\"#file-upload-permissions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">0o644</span></code></p>\n<p>The numeric mode (i.e. <code class=\"docutils literal notranslate\"><span class=\"pre\">0o644</span></code>) to set newly uploaded files to. For\nmore information about what these modes mean, see the documentation for\n<a class=\"reference external\" href=\"https://docs.python.org/3/library/os.html#os.chmod\" title=\"(in Python v3.14)\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">os.chmod()</span></code></a>.</p>\n<p>If <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, you'll get operating-system dependent behavior. On most platforms,\ntemporary files will have a mode of <code class=\"docutils literal notranslate\"><span class=\"pre\">0o600</span></code>, and files saved from memory will\nbe saved using the system's standard umask.</p>\n<p>For security reasons, these permissions aren't applied to the temporary files\nthat are stored in <a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_TEMP_DIR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_TEMP_DIR</span></code></a>.</p>\n<p>This setting also determines the default permissions for collected static files\nwhen using the <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command. See\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> for details on overriding it.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p><strong>Always prefix the mode with</strong> <code class=\"docutils literal notranslate\"><span class=\"pre\">0o</span></code> <strong>.</strong></p>\n<p>If you're not familiar with file modes, please note that the <code class=\"docutils literal notranslate\"><span class=\"pre\">0o</span></code> prefix\nis very important: it indicates an octal number, which is the way that\nmodes must be specified. If you try to use <code class=\"docutils literal notranslate\"><span class=\"pre\">644</span></code>, you'll get totally\nincorrect behavior.</p>\n</aside>\n<aside class=\"version-note version-changed\" data-version=\"3.0\">\n<p class=\"version-note-title\">Changed in Django 3.0</p><p>In older versions, the default value is <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>.</p>\n</aside>\n</section>\n<section id=\"file-upload-temp-dir\">\n<span id=\"std-setting-FILE_UPLOAD_TEMP_DIR\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_TEMP_DIR</span></code><a class=\"heading-anchor\" href=\"#file-upload-temp-dir\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The directory to store data to (typically files larger than\n<a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_MAX_MEMORY_SIZE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_MAX_MEMORY_SIZE</span></code></a>) temporarily while uploading files.\nIf <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, Django will use the standard temporary directory for the operating\nsystem. For example, this will default to <code class=\"docutils literal notranslate\"><span class=\"pre\">/tmp</span></code> on *nix-style operating\nsystems.</p>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/topics/files/\"><span class=\"doc\">ファイルの管理</span></a> for details.</p>\n</section>\n<section id=\"first-day-of-week\">\n<span id=\"std-setting-FIRST_DAY_OF_WEEK\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FIRST_DAY_OF_WEEK</span></code><a class=\"heading-anchor\" href=\"#first-day-of-week\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code> (日曜日)</p>\n<p>A number representing the first day of the week. This is especially useful\nwhen displaying a calendar. This value is only used when not using\nformat internationalization, or when a format cannot be found for the\ncurrent locale.</p>\n<p>The value must be an integer from 0 to 6, where 0 means Sunday, 1 means\nMonday and so on.</p>\n</section>\n<section id=\"fixture-dirs\">\n<span id=\"std-setting-FIXTURE_DIRS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FIXTURE_DIRS</span></code><a class=\"heading-anchor\" href=\"#fixture-dirs\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>List of directories searched for fixture files, in addition to the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">fixtures</span></code> directory of each application, in search order.</p>\n<p>Note that these paths should use Unix-style forward slashes, even on Windows.</p>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/howto/initial-data/#initial-data-via-fixtures\"><span class=\"std std-ref\">フィクスチャでデータを投入する</span></a> and <a class=\"reference internal\" href=\"/ja/3.1/topics/testing/tools/#topics-testing-fixtures\"><span class=\"std std-ref\">フィクスチャーのロード</span></a>.</p>\n</section>\n<section id=\"force-script-name\">\n<span id=\"std-setting-FORCE_SCRIPT_NAME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FORCE_SCRIPT_NAME</span></code><a class=\"heading-anchor\" href=\"#force-script-name\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>If not <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, this will be used as the value of the <code class=\"docutils literal notranslate\"><span class=\"pre\">SCRIPT_NAME</span></code>\nenvironment variable in any HTTP request. This setting can be used to override\nthe server-provided value of <code class=\"docutils literal notranslate\"><span class=\"pre\">SCRIPT_NAME</span></code>, which may be a rewritten version\nof the preferred value or not supplied at all. It is also used by\n<a class=\"reference internal\" href=\"/ja/3.1/ref/applications/#django.setup\" title=\"django.setup\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">django.setup()</span></code></a> to set the URL resolver script prefix outside of the\nrequest/response cycle (e.g. in management commands and standalone scripts) to\ngenerate correct URLs when <code class=\"docutils literal notranslate\"><span class=\"pre\">SCRIPT_NAME</span></code> is not <code class=\"docutils literal notranslate\"><span class=\"pre\">/</span></code>.</p>\n</section>\n<section id=\"form-renderer\">\n<span id=\"std-setting-FORM_RENDERER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FORM_RENDERER</span></code><a class=\"heading-anchor\" href=\"#form-renderer\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/ja/3.1/ref/forms/renderers/#django.forms.renderers.DjangoTemplates\" title=\"django.forms.renderers.DjangoTemplates\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.forms.renderers.DjangoTemplates</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>The class that renders form widgets. It must implement <a class=\"reference internal\" href=\"/ja/3.1/ref/forms/renderers/#low-level-widget-render-api\"><span class=\"std std-ref\">the low-level\nrender API</span></a>.</p>\n</section>\n<section id=\"format-module-path\">\n<span id=\"std-setting-FORMAT_MODULE_PATH\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FORMAT_MODULE_PATH</span></code><a class=\"heading-anchor\" href=\"#format-module-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>A full Python path to a Python package that contains custom format definitions\nfor project locales. If not <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, Django will check for a <code class=\"docutils literal notranslate\"><span class=\"pre\">formats.py</span></code>\nfile, under the directory named as the current locale, and will use the\nformats defined in this file.</p>\n<p>For example, if <a class=\"reference internal\" href=\"#std-setting-FORMAT_MODULE_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FORMAT_MODULE_PATH</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">mysite.formats</span></code>,\nand current language is <code class=\"docutils literal notranslate\"><span class=\"pre\">en</span></code> (English), Django will expect a directory tree\nlike:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">mysite</span><span class=\"o\">/</span>\n    <span class=\"n\">formats</span><span class=\"o\">/</span>\n        <span class=\"fm\">__init__</span><span class=\"o\">.</span><span class=\"n\">py</span>\n        <span class=\"n\">en</span><span class=\"o\">/</span>\n            <span class=\"fm\">__init__</span><span class=\"o\">.</span><span class=\"n\">py</span>\n            <span class=\"n\">formats</span><span class=\"o\">.</span><span class=\"n\">py</span>\n</code></pre></div>\n<p>You can also set this setting to a list of Python paths, for example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">FORMAT_MODULE_PATH</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"s1\">&#39;mysite.formats&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;some_app.formats&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>When Django searches for a certain format, it will go through all given Python\npaths until it finds a module that actually defines the given format. This\nmeans that formats defined in packages farther up in the list will take\nprecedence over the same formats in packages farther down.</p>\n<p>Available formats are:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATE_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>,</p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATETIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DECIMAL_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DECIMAL_SEPARATOR</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FIRST_DAY_OF_WEEK\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FIRST_DAY_OF_WEEK</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MONTH_DAY_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MONTH_DAY_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SHORT_DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SHORT_DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATETIME_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-YEAR_MONTH_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">YEAR_MONTH_FORMAT</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"ignorable-404-urls\">\n<span id=\"std-setting-IGNORABLE_404_URLS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">IGNORABLE_404_URLS</span></code><a class=\"heading-anchor\" href=\"#ignorable-404-urls\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>List of compiled regular expression objects describing URLs that should be\nignored when reporting HTTP 404 errors via email (see\n<a class=\"reference internal\" href=\"/ja/3.1/howto/error-reporting/\"><span class=\"doc\">エラーのレポート</span></a>). Regular expressions are matched against\n<a class=\"reference internal\" href=\"/ja/3.1/ref/request-response/#django.http.HttpRequest.get_full_path\" title=\"django.http.HttpRequest.get_full_path\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">request's</span> <span class=\"pre\">full</span> <span class=\"pre\">paths</span></code></a> (including\nquery string, if any). Use this if your site does not provide a commonly\nrequested file such as <code class=\"docutils literal notranslate\"><span class=\"pre\">favicon.ico</span></code> or <code class=\"docutils literal notranslate\"><span class=\"pre\">robots.txt</span></code>.</p>\n<p>This is only used if\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.common.BrokenLinkEmailsMiddleware\" title=\"django.middleware.common.BrokenLinkEmailsMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">BrokenLinkEmailsMiddleware</span></code></a> is enabled (see\n<a class=\"reference internal\" href=\"/ja/3.1/topics/http/middleware/\"><span class=\"doc\">ミドルウェア (Middleware)</span></a>).</p>\n</section>\n<section id=\"installed-apps\">\n<span id=\"std-setting-INSTALLED_APPS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code><a class=\"heading-anchor\" href=\"#installed-apps\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>A list of strings designating all applications that are enabled in this\nDjango installation. Each string should be a dotted Python path to:</p>\n<ul class=\"simple\">\n<li><p>an application configuration class (preferred), or</p></li>\n<li><p>a package containing an application.</p></li>\n</ul>\n<p><a class=\"reference internal\" href=\"/ja/3.1/ref/applications/\"><span class=\"doc\">Learn more about application configurations</span></a>.</p>\n<aside class=\"admonition-use-the-application-registry-for-introspection admonition\">\n<p class=\"admonition-title\">Use the application registry for introspection</p>\n<p>Your code should never access <a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> directly. Use\n<a class=\"reference internal\" href=\"/ja/3.1/ref/applications/#django.apps.apps\" title=\"django.apps.apps\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">django.apps.apps</span></code></a> instead.</p>\n</aside>\n<aside class=\"admonition-application-names-and-labels-must-be-unique-in-setting-installed-apps admonition\">\n<p class=\"admonition-title\">Application names and labels must be unique in\n            <a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a></p>\n<p>Application <a class=\"reference internal\" href=\"/ja/3.1/ref/applications/#django.apps.AppConfig.name\" title=\"django.apps.AppConfig.name\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">names</span></code></a> — the dotted Python\npath to the application package — must be unique. There is no way to\ninclude the same application twice, short of duplicating its code under\nanother name.</p>\n<p>Application <a class=\"reference internal\" href=\"/ja/3.1/ref/applications/#django.apps.AppConfig.label\" title=\"django.apps.AppConfig.label\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">labels</span></code></a> — by default the\nfinal part of the name — must be unique too. For example, you can't\ninclude both <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.auth</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">myproject.auth</span></code>. However, you\ncan relabel an application with a custom configuration that defines a\ndifferent <a class=\"reference internal\" href=\"/ja/3.1/ref/applications/#django.apps.AppConfig.label\" title=\"django.apps.AppConfig.label\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">label</span></code></a>.</p>\n<p>These rules apply regardless of whether <a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a>\nreferences application configuration classes or application packages.</p>\n</aside>\n<p>When several applications provide different versions of the same resource\n(template, static file, management command, translation), the application\nlisted first in <a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> has precedence.</p>\n</section>\n<section id=\"internal-ips\">\n<span id=\"std-setting-INTERNAL_IPS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">INTERNAL_IPS</span></code><a class=\"heading-anchor\" href=\"#internal-ips\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>A list of IP addresses, as strings, that:</p>\n<ul class=\"simple\">\n<li><p>Allow the <a class=\"reference internal\" href=\"/ja/3.1/ref/templates/api/#django.template.context_processors.debug\" title=\"django.template.context_processors.debug\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">debug()</span></code></a> context processor\nto add some variables to the template context.</p></li>\n<li><p>Can use the <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/admin/admindocs/#admindocs-bookmarklets\"><span class=\"std std-ref\">admindocs bookmarklets</span></a> even if\nnot logged in as a staff user.</p></li>\n<li><p>Are marked as &quot;internal&quot; (as opposed to &quot;EXTERNAL&quot;) in\n<a class=\"reference internal\" href=\"/ja/3.1/topics/logging/#django.utils.log.AdminEmailHandler\" title=\"django.utils.log.AdminEmailHandler\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">AdminEmailHandler</span></code></a> emails.</p></li>\n</ul>\n</section>\n<section id=\"language-code\">\n<span id=\"std-setting-LANGUAGE_CODE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_CODE</span></code><a class=\"heading-anchor\" href=\"#language-code\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'en-us'</span></code></p>\n<p>このインストールに対する言語コードを表す文字列です。標準の <a class=\"reference internal\" href=\"/ja/3.1/topics/i18n/#term-language-code\"><span class=\"xref std std-term\">言語 ID フォーマット</span></a> 内にある文字列を指定します。例えば、U.S. の英語は <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;en-us&quot;</span></code> です。<a class=\"reference external\" href=\"http://www.i18nguy.com/unicode/language-identifiers.html\">list of language identifiers</a> と <a class=\"reference internal\" href=\"/ja/3.1/topics/i18n/\"><span class=\"doc\">国際化とローカル化</span></a> も参照してください。</p>\n<p>この設定が効果を持つためには、<a class=\"reference internal\" href=\"#std-setting-USE_I18N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_I18N</span></code></a> をアクティブにする必要があります。</p>\n<p>これは 2 つの目的に使われます:</p>\n<ul class=\"simple\">\n<li><p>ロケールミドルウェアが使用されていない場合、全ユーザにどの翻訳を提供するかを決めます。</p></li>\n<li><p>ロケールミドルウェアがアクティブの場合、ユーザの好む言語が不明な場合やウェブサイトでサポートされていない場合に備えて、フォールバックの言語として利用されます。また、与えられた文字列に対して、ユーザの好む言語に対応する翻訳が存在しない場合にも、この設定が利用されます。</p></li>\n</ul>\n<p>詳しくは <a class=\"reference internal\" href=\"/ja/3.1/topics/i18n/translation/#how-django-discovers-language-preference\"><span class=\"std std-ref\">How Django discovers language preference</span></a> を参照してください。</p>\n</section>\n<section id=\"language-cookie-age\">\n<span id=\"std-setting-LANGUAGE_COOKIE_AGE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_AGE</span></code><a class=\"heading-anchor\" href=\"#language-cookie-age\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> (ブラウザを閉じると期限切れとなります)</p>\n<p>言語クッキーの age で、秒で表します。</p>\n</section>\n<section id=\"language-cookie-domain\">\n<span id=\"std-setting-LANGUAGE_COOKIE_DOMAIN\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_DOMAIN</span></code><a class=\"heading-anchor\" href=\"#language-cookie-domain\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The domain to use for the language cookie. Set this to a string such as\n<code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;example.com&quot;</span></code> for cross-domain cookies, or use <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for a standard\ndomain cookie.</p>\n<p>Be cautious when updating this setting on a production site. If you update\nthis setting to enable cross-domain cookies on a site that previously used\nstandard domain cookies, existing user cookies that have the old domain\nwill not be updated. This will result in site users being unable to switch\nthe language as long as these cookies persist. The only safe and reliable\noption to perform the switch is to change the language cookie name\npermanently (via the <a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_NAME</span></code></a> setting) and to add\na middleware that copies the value from the old cookie to a new one and then\ndeletes the old one.</p>\n</section>\n<section id=\"language-cookie-httponly\">\n<span id=\"std-setting-LANGUAGE_COOKIE_HTTPONLY\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_HTTPONLY</span></code><a class=\"heading-anchor\" href=\"#language-cookie-httponly\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"3.0\">\n<p class=\"version-note-title\">New in Django 3.0</p></aside>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to use <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpOnly</span></code> flag on the language cookie. If this is set to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, client-side JavaScript will not be able to access the language\ncookie.</p>\n<p>See <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_HTTPONLY</span></code></a> for details on <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpOnly</span></code>.</p>\n</section>\n<section id=\"language-cookie-name\">\n<span id=\"std-setting-LANGUAGE_COOKIE_NAME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_NAME</span></code><a class=\"heading-anchor\" href=\"#language-cookie-name\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'django_language'</span></code></p>\n<p>The name of the cookie to use for the language cookie. This can be whatever\nyou want (as long as it's different from the other cookie names in your\napplication). See <a class=\"reference internal\" href=\"/ja/3.1/topics/i18n/\"><span class=\"doc\">国際化とローカル化</span></a>.</p>\n</section>\n<section id=\"language-cookie-path\">\n<span id=\"std-setting-LANGUAGE_COOKIE_PATH\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_PATH</span></code><a class=\"heading-anchor\" href=\"#language-cookie-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'/'</span></code></p>\n<p>The path set on the language cookie. This should either match the URL path of your\nDjango installation or be a parent of that path.</p>\n<p>This is useful if you have multiple Django instances running under the same\nhostname. They can use different cookie paths and each instance will only see\nits own language cookie.</p>\n<p>Be cautious when updating this setting on a production site. If you update this\nsetting to use a deeper path than it previously used, existing user cookies that\nhave the old path will not be updated. This will result in site users being\nunable to switch the language as long as these cookies persist. The only safe\nand reliable option to perform the switch is to change the language cookie name\npermanently (via the <a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_NAME</span></code></a> setting), and to add\na middleware that copies the value from the old cookie to a new one and then\ndeletes the one.</p>\n</section>\n<section id=\"language-cookie-samesite\">\n<span id=\"std-setting-LANGUAGE_COOKIE_SAMESITE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_SAMESITE</span></code><a class=\"heading-anchor\" href=\"#language-cookie-samesite\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"3.0\">\n<p class=\"version-note-title\">New in Django 3.0</p></aside>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The value of the <a class=\"reference external\" href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite\">SameSite</a> flag on the language cookie. This flag prevents the\ncookie from being sent in cross-site requests.</p>\n<p>See <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_SAMESITE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SAMESITE</span></code></a> for details about <code class=\"docutils literal notranslate\"><span class=\"pre\">SameSite</span></code>.</p>\n<aside class=\"version-note version-changed\" data-version=\"3.1\">\n<p class=\"version-note-title\">Changed in Django 3.1</p><p>Setting <code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_SAMESITE</span> <span class=\"pre\">=</span> <span class=\"pre\">'None'</span></code> was allowed.</p>\n</aside>\n</section>\n<section id=\"language-cookie-secure\">\n<span id=\"std-setting-LANGUAGE_COOKIE_SECURE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_SECURE</span></code><a class=\"heading-anchor\" href=\"#language-cookie-secure\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"3.0\">\n<p class=\"version-note-title\">New in Django 3.0</p></aside>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to use a secure cookie for the language cookie. If this is set to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the cookie will be marked as &quot;secure&quot;, which means browsers may\nensure that the cookie is only sent under an HTTPS connection.</p>\n</section>\n<section id=\"languages\">\n<span id=\"std-setting-LANGUAGES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGES</span></code><a class=\"heading-anchor\" href=\"#languages\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Default: A list of all available languages. This list is continually growing\nand including a copy here would inevitably become rapidly out of date. You can\nsee the current list of translated languages by looking in\n<a class=\"extlink-source reference external\" href=\"https://github.com/django/django/blob/stable/3.1.x/django/conf/global_settings.py\">django/conf/global_settings.py</a>.</p>\n<p>このリストは、(<a class=\"reference internal\" href=\"/ja/3.1/topics/i18n/#term-language-code\"><span class=\"xref std std-term\">言語コード</span></a>, <code class=\"docutils literal notranslate\"><span class=\"pre\">言語名</span></code>) 形式の 2 タプルのリストです  -- 例えば <code class=\"docutils literal notranslate\"><span class=\"pre\">('ja',</span> <span class=\"pre\">'Japanese')</span></code> です。これはどの言語が言語選択で利用可能かを指定します。<a class=\"reference internal\" href=\"/ja/3.1/topics/i18n/\"><span class=\"doc\">国際化とローカル化</span></a> を参照してください。</p>\n<p>一般的には、デフォルト値で十分です。Django が提供する言語の部分集合に選択肢を限定したいときにのみ、この設定を自分でセットしてください。</p>\n<p>If you define a custom <a class=\"reference internal\" href=\"#std-setting-LANGUAGES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGES</span></code></a> setting, you can mark the\nlanguage names as translation strings using the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/utils/#django.utils.translation.gettext_lazy\" title=\"django.utils.translation.gettext_lazy\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">gettext_lazy()</span></code></a> function.</p>\n<p>以下はサンプルの設定ファイルです:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.utils.translation</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">gettext_lazy</span> <span class=\"k\">as</span> <span class=\"n\">_</span>\n\n<span class=\"n\">LANGUAGES</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"p\">(</span><span class=\"s1\">&#39;de&#39;</span><span class=\"p\">,</span> <span class=\"n\">_</span><span class=\"p\">(</span><span class=\"s1\">&#39;German&#39;</span><span class=\"p\">)),</span>\n    <span class=\"p\">(</span><span class=\"s1\">&#39;en&#39;</span><span class=\"p\">,</span> <span class=\"n\">_</span><span class=\"p\">(</span><span class=\"s1\">&#39;English&#39;</span><span class=\"p\">)),</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n</section>\n<section id=\"languages-bidi\">\n<span id=\"std-setting-LANGUAGES_BIDI\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGES_BIDI</span></code><a class=\"heading-anchor\" href=\"#languages-bidi\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Default: A list of all language codes that are written right-to-left. You can\nsee the current list of these languages by looking in\n<a class=\"extlink-source reference external\" href=\"https://github.com/django/django/blob/stable/3.1.x/django/conf/global_settings.py\">django/conf/global_settings.py</a>.</p>\n<p>The list contains <a class=\"reference internal\" href=\"/ja/3.1/topics/i18n/#term-language-code\"><span class=\"xref std std-term\">language codes</span></a> for languages that are\nwritten right-to-left.</p>\n<p>Generally, the default value should suffice. Only set this setting if you want\nto restrict language selection to a subset of the Django-provided languages.\nIf you define a custom <a class=\"reference internal\" href=\"#std-setting-LANGUAGES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGES</span></code></a> setting, the list of bidirectional\nlanguages may contain language codes which are not enabled on a given site.</p>\n</section>\n<section id=\"locale-paths\">\n<span id=\"std-setting-LOCALE_PATHS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LOCALE_PATHS</span></code><a class=\"heading-anchor\" href=\"#locale-paths\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>Django が翻訳ファイルを探すディレクトリのリストです。<a class=\"reference internal\" href=\"/ja/3.1/topics/i18n/translation/#how-django-discovers-translations\"><span class=\"std std-ref\">How Django discovers translations</span></a> を参照してください。</p>\n<p>実装例:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">LOCALE_PATHS</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"s1\">&#39;/home/www/project/common_files/locale&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;/var/local/translations/locale&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>Django は、実際の翻訳ファイルを含む <code class=\"docutils literal notranslate\"><span class=\"pre\">&lt;locale_code&gt;/LC_MESSAGES</span></code> ディレクトリに対して、これらのパス内をそれぞれ見ていきます。</p>\n</section>\n<section id=\"logging\">\n<span id=\"std-setting-LOGGING\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LOGGING</span></code><a class=\"heading-anchor\" href=\"#logging\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: ロギング設定のディレクトリ。</p>\n<p>A data structure containing configuration information. The contents of\nthis data structure will be passed as the argument to the\nconfiguration method described in <a class=\"reference internal\" href=\"#std-setting-LOGGING_CONFIG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOGGING_CONFIG</span></code></a>.</p>\n<p>Among other things, the default logging configuration passes HTTP 500 server\nerrors to an email log handler when <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>. See also\n<a class=\"reference internal\" href=\"/ja/3.1/topics/logging/#configuring-logging\"><span class=\"std std-ref\">ロギングを設定する</span></a>.</p>\n<p>You can see the default logging configuration by looking in\n<a class=\"extlink-source reference external\" href=\"https://github.com/django/django/blob/stable/3.1.x/django/utils/log.py\">django/utils/log.py</a>.</p>\n</section>\n<section id=\"logging-config\">\n<span id=\"std-setting-LOGGING_CONFIG\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LOGGING_CONFIG</span></code><a class=\"heading-anchor\" href=\"#logging-config\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'logging.config.dictConfig'</span></code></p>\n<p>A path to a callable that will be used to configure logging in the\nDjango project. Points at an instance of Python's <a class=\"reference external\" href=\"https://docs.python.org/3/library/logging.config.html#logging-config-dictschema\" title=\"(in Python v3.14)\"><span class=\"xref std std-ref\">dictConfig</span></a> configuration method by default.</p>\n<p>If you set <a class=\"reference internal\" href=\"#std-setting-LOGGING_CONFIG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOGGING_CONFIG</span></code></a> to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, the logging\nconfiguration process will be skipped.</p>\n</section>\n<section id=\"managers\">\n<span id=\"std-setting-MANAGERS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code><a class=\"heading-anchor\" href=\"#managers\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>A list in the same format as <a class=\"reference internal\" href=\"#std-setting-ADMINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code></a> that specifies who should get\nbroken link notifications when\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.common.BrokenLinkEmailsMiddleware\" title=\"django.middleware.common.BrokenLinkEmailsMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">BrokenLinkEmailsMiddleware</span></code></a> is enabled.</p>\n</section>\n<section id=\"media-root\">\n<span id=\"std-setting-MEDIA_ROOT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MEDIA_ROOT</span></code><a class=\"heading-anchor\" href=\"#media-root\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>Absolute filesystem path to the directory that will hold <a class=\"reference internal\" href=\"/ja/3.1/topics/files/\"><span class=\"doc\">user-uploaded\nfiles</span></a>.</p>\n<p>Example: <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;/var/www/example.com/media/&quot;</span></code></p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-MEDIA_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_URL</span></code></a>.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p><a class=\"reference internal\" href=\"#std-setting-MEDIA_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_ROOT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a> must have different\nvalues. Before <a class=\"reference internal\" href=\"#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a> was introduced, it was common to\nrely or fallback on <a class=\"reference internal\" href=\"#std-setting-MEDIA_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_ROOT</span></code></a> to also serve static files;\nhowever, since this can have serious security implications, there is a\nvalidation check to prevent it.</p>\n</aside>\n</section>\n<section id=\"media-url\">\n<span id=\"std-setting-MEDIA_URL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MEDIA_URL</span></code><a class=\"heading-anchor\" href=\"#media-url\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>URL that handles the media served from <a class=\"reference internal\" href=\"#std-setting-MEDIA_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_ROOT</span></code></a>, used\nfor <a class=\"reference internal\" href=\"/ja/3.1/topics/files/\"><span class=\"doc\">managing stored files</span></a>. It must end in a slash if set\nto a non-empty value. You will need to <a class=\"reference internal\" href=\"/ja/3.1/howto/static-files/#serving-uploaded-files-in-development\"><span class=\"std std-ref\">configure these files to be served</span></a> in both development and production\nenvironments.</p>\n<p>If you want to use <code class=\"docutils literal notranslate\"><span class=\"pre\">{{</span> <span class=\"pre\">MEDIA_URL</span> <span class=\"pre\">}}</span></code> in your templates, add\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'django.template.context_processors.media'</span></code> in the <code class=\"docutils literal notranslate\"><span class=\"pre\">'context_processors'</span></code>\noption of <a class=\"reference internal\" href=\"#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TEMPLATES</span></code></a>.</p>\n<p>Example: <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;http://media.example.com/&quot;</span></code></p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p>信頼できないユーザーからコンテンツアップロードを許可する場合、セキュリティリスクが存在します！緩和策の詳細は、<a class=\"reference internal\" href=\"/ja/3.1/topics/security/#user-uploaded-content-security\"><span class=\"std std-ref\">ユーザーがアップロードしたコンテンツ</span></a> のセキュリティガイドをご覧ください。</p>\n</aside>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p><a class=\"reference internal\" href=\"#std-setting-MEDIA_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_URL</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-STATIC_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_URL</span></code></a> must have different\nvalues. See <a class=\"reference internal\" href=\"#std-setting-MEDIA_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_ROOT</span></code></a> for more details.</p>\n</aside>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>If <a class=\"reference internal\" href=\"#std-setting-MEDIA_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_URL</span></code></a> is a relative path, then it will be prefixed by the\nserver-provided value of <code class=\"docutils literal notranslate\"><span class=\"pre\">SCRIPT_NAME</span></code> (or <code class=\"docutils literal notranslate\"><span class=\"pre\">/</span></code> if not set). This makes\nit easier to serve a Django application in a subpath without adding an\nextra configuration to the settings.</p>\n</aside>\n</section>\n<section id=\"middleware\">\n<span id=\"std-setting-MIDDLEWARE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE</span></code><a class=\"heading-anchor\" href=\"#middleware\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>A list of middleware to use. See <a class=\"reference internal\" href=\"/ja/3.1/topics/http/middleware/\"><span class=\"doc\">ミドルウェア (Middleware)</span></a>.</p>\n</section>\n<section id=\"migration-modules\">\n<span id=\"std-setting-MIGRATION_MODULES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MIGRATION_MODULES</span></code><a class=\"heading-anchor\" href=\"#migration-modules\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (空の辞書)</p>\n<p>A dictionary specifying the package where migration modules can be found on a\nper-app basis. The default value of this setting is an empty dictionary, but\nthe default package name for migration modules is <code class=\"docutils literal notranslate\"><span class=\"pre\">migrations</span></code>.</p>\n<p>実装例:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">{</span><span class=\"s1\">&#39;blog&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;blog.db_migrations&#39;</span><span class=\"p\">}</span>\n</code></pre></div>\n<p>In this case, migrations pertaining to the <code class=\"docutils literal notranslate\"><span class=\"pre\">blog</span></code> app will be contained in\nthe <code class=\"docutils literal notranslate\"><span class=\"pre\">blog.db_migrations</span></code> package.</p>\n<p>If you provide the <code class=\"docutils literal notranslate\"><span class=\"pre\">app_label</span></code> argument, <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-makemigrations\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">makemigrations</span></code></a> will\nautomatically create the package if it doesn't already exist.</p>\n<p>When you supply <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> as a value for an app, Django will consider the app as\nan app without migrations regardless of an existing <code class=\"docutils literal notranslate\"><span class=\"pre\">migrations</span></code> submodule.\nThis can be used, for example, in a test settings file to skip migrations while\ntesting (tables will still be created for the apps' models). To disable\nmigrations for all apps during tests, you can set the\n<a class=\"reference internal\" href=\"#std-setting-TEST_MIGRATE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIGRATE</span></code></a> to <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> instead. If\n<code class=\"docutils literal notranslate\"><span class=\"pre\">MIGRATION_MODULES</span></code> is used in your general project settings, remember to use\nthe <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#cmdoption-migrate-run-syncdb\"><code class=\"xref std std-option docutils literal notranslate\"><span class=\"pre\">migrate</span> <span class=\"pre\">--run-syncdb</span></code></a> option if you want to create tables for the\napp.</p>\n</section>\n<section id=\"month-day-format\">\n<span id=\"std-setting-MONTH_DAY_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MONTH_DAY_FORMAT</span></code><a class=\"heading-anchor\" href=\"#month-day-format\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'F</span> <span class=\"pre\">j'</span></code></p>\n<p>admin change-list のページの日付をフォーマットする時のデフォルト値です。システムの他の場所で月と日だけが表示される場合に使用される可能性があります。</p>\n<p>たとえば、Django の admin change-list のページを日付でフィルタする時、与えられた日付のヘッダには月と日が表示されます。</p>\n<p><a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> を <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> に設定すると、ロケールに基づいた対応するフォーマットが高い優先度で適用されるので気をつけてください。</p>\n<p><a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a> を参照してください。また、<a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-YEAR_MONTH_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">YEAR_MONTH_FORMAT</span></code></a> も参照してください。</p>\n</section>\n<section id=\"number-grouping\">\n<span id=\"std-setting-NUMBER_GROUPING\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code><a class=\"heading-anchor\" href=\"#number-grouping\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code></p>\n<p>数の整数部分をまとめるときの桁数です。</p>\n<p>よくある使われ方は、1000倍の区切り文字を表示するときです。<code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code> に設定すると、数に対してグルーピングを行いません。<code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code> より大きい値を指定すると、 <a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a> が区切り位置を求めるのに使います。</p>\n<p>Some locales use non-uniform digit grouping, e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">10,00,00,000</span></code> in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">en_IN</span></code>. For this case, you can provide a sequence with the number of digit\ngroup sizes to be applied. The first number defines the size of the group\npreceding the decimal delimiter, and each number that follows defines the size\nof preceding groups. If the sequence is terminated with <code class=\"docutils literal notranslate\"><span class=\"pre\">-1</span></code>, no further\ngrouping is performed. If the sequence terminates with a <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code>, the last group\nsize is used for the remainder of the number.</p>\n<p>Example tuple for <code class=\"docutils literal notranslate\"><span class=\"pre\">en_IN</span></code>:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">NUMBER_GROUPING</span> <span class=\"o\">=</span> <span class=\"p\">(</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">)</span>\n</code></pre></div>\n<p>Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the locale-dictated\nformat has higher precedence and will be applied instead.</p>\n<p><a class=\"reference internal\" href=\"#std-setting-DECIMAL_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DECIMAL_SEPARATOR</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-USE_THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_THOUSAND_SEPARATOR</span></code></a> も参照してください。</p>\n</section>\n<section id=\"prepend-www\">\n<span id=\"std-setting-PREPEND_WWW\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">PREPEND_WWW</span></code><a class=\"heading-anchor\" href=\"#prepend-www\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>&quot;www.&quot; サブドメインが URL に含まれていない時、自動的に頭に追加するかどうかを指定します。この設定が有効になるのは、 <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.common.CommonMiddleware\" title=\"django.middleware.common.CommonMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">CommonMiddleware</span></code></a> がインストールされている時のみです (参照: <a class=\"reference internal\" href=\"/ja/3.1/topics/http/middleware/\"><span class=\"doc\">ミドルウェア (Middleware)</span></a>)。<a class=\"reference internal\" href=\"#std-setting-APPEND_SLASH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">APPEND_SLASH</span></code></a> も参照してください。</p>\n</section>\n<section id=\"root-urlconf\">\n<span id=\"std-setting-ROOT_URLCONF\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">ROOT_URLCONF</span></code><a class=\"heading-anchor\" href=\"#root-urlconf\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: 定義されていません</p>\n<p>A string representing the full Python import path to your root URLconf, for\nexample <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;mydjangoapps.urls&quot;</span></code>. Can be overridden on a per-request basis by\nsetting the attribute <code class=\"docutils literal notranslate\"><span class=\"pre\">urlconf</span></code> on the incoming <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpRequest</span></code>\nobject. See <a class=\"reference internal\" href=\"/ja/3.1/topics/http/urls/#how-django-processes-a-request\"><span class=\"std std-ref\">Django のリクエスト処理</span></a> for details.</p>\n</section>\n<section id=\"secret-key\">\n<span id=\"std-setting-SECRET_KEY\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code><a class=\"heading-anchor\" href=\"#secret-key\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (空文字列)</p>\n<p>Django のインストールごとに設定される個別の秘密鍵です。<a class=\"reference internal\" href=\"/ja/3.1/topics/signing/\"><span class=\"doc\">cryptographic signing</span></a> に使われる鍵であり、ユニークかつ予測できない値でなければなりません。</p>\n<p><a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span> <span class=\"pre\">startproject</span></code></a> コマンドを実行すると、新しいプロジェクトを作成するたびに、ランダムに生成された <code class=\"docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code> を自動的に設定してくれます。</p>\n<p>Uses of the key shouldn't assume that it's text or bytes. Every use should go\nthrough <a class=\"reference internal\" href=\"/ja/3.1/ref/utils/#django.utils.encoding.force_str\" title=\"django.utils.encoding.force_str\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">force_str()</span></code></a> or\n<a class=\"reference internal\" href=\"/ja/3.1/ref/utils/#django.utils.encoding.force_bytes\" title=\"django.utils.encoding.force_bytes\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">force_bytes()</span></code></a> to convert it to the desired type.</p>\n<p><a class=\"reference internal\" href=\"#std-setting-SECRET_KEY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code></a> が設定されていない場合、Django は起動しません。</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p><strong>この値は、絶対に秘密にしてください。</strong></p>\n<p>Django を既知の setting:SECRET_KEY で実行してしまうと、Django の多数のセキュリティプロテクションが破られ、結果的に、コンピュータの重要な権限が取得されてリモートコード実行の脆弱性に晒されてしまいます。</p>\n</aside>\n<p>秘密鍵は次のような場合に使われます。</p>\n<ul class=\"simple\">\n<li><p>All <a class=\"reference internal\" href=\"/ja/3.1/topics/http/sessions/\"><span class=\"doc\">sessions</span></a> if you are using\nany other session backend than <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.sessions.backends.cache</span></code>,\nor are using the default\n<a class=\"reference internal\" href=\"/ja/3.1/topics/auth/customizing/#django.contrib.auth.models.AbstractBaseUser.get_session_auth_hash\" title=\"django.contrib.auth.models.AbstractBaseUser.get_session_auth_hash\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">get_session_auth_hash()</span></code></a>.</p></li>\n<li><p>All <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/\"><span class=\"doc\">messages</span></a> if you are using\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#django.contrib.messages.storage.cookie.CookieStorage\" title=\"django.contrib.messages.storage.cookie.CookieStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">CookieStorage</span></code></a> or\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#django.contrib.messages.storage.fallback.FallbackStorage\" title=\"django.contrib.messages.storage.fallback.FallbackStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">FallbackStorage</span></code></a>.</p></li>\n<li><p>All <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/default/#django.contrib.auth.views.PasswordResetView\" title=\"django.contrib.auth.views.PasswordResetView\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">PasswordResetView</span></code></a> tokens.</p></li>\n<li><p>Any usage of <a class=\"reference internal\" href=\"/ja/3.1/topics/signing/\"><span class=\"doc\">cryptographic signing</span></a>, unless a\ndifferent key is provided.</p></li>\n</ul>\n<p>If you rotate your secret key, all of the above will be invalidated.\nSecret keys are not used for passwords of users and key rotation will not\naffect them.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>The default <code class=\"file docutils literal notranslate\"><span class=\"pre\">settings.py</span></code> file created by <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> creates a unique <code class=\"docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code> for\nconvenience.</p>\n</aside>\n</section>\n<section id=\"secure-browser-xss-filter\">\n<span id=\"std-setting-SECURE_BROWSER_XSS_FILTER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_BROWSER_XSS_FILTER</span></code><a class=\"heading-anchor\" href=\"#secure-browser-xss-filter\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>If <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> sets\nthe <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#x-xss-protection\"><span class=\"std std-ref\">X-XSS-Protection: 1; mode=block</span></a> header on all responses that do not already have it.</p>\n<p>Modern browsers don't honor <code class=\"docutils literal notranslate\"><span class=\"pre\">X-XSS-Protection</span></code> HTTP header anymore. Although\nthe setting offers little practical benefit, you may still want to set the\nheader if you support older browsers.</p>\n</section>\n<section id=\"secure-content-type-nosniff\">\n<span id=\"std-setting-SECURE_CONTENT_TYPE_NOSNIFF\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_CONTENT_TYPE_NOSNIFF</span></code><a class=\"heading-anchor\" href=\"#secure-content-type-nosniff\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code></p>\n<p>If <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a>\nsets the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#x-content-type-options\"><span class=\"std std-ref\">X-Content-Type-Options: nosniff</span></a> header on all responses that do not\nalready have it.</p>\n<aside class=\"version-note version-changed\" data-version=\"3.0\">\n<p class=\"version-note-title\">Changed in Django 3.0</p><p>In older versions, the default value is <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>.</p>\n</aside>\n</section>\n<section id=\"secure-hsts-include-subdomains\">\n<span id=\"std-setting-SECURE_HSTS_INCLUDE_SUBDOMAINS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_INCLUDE_SUBDOMAINS</span></code><a class=\"heading-anchor\" href=\"#secure-hsts-include-subdomains\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>If <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> adds\nthe <code class=\"docutils literal notranslate\"><span class=\"pre\">includeSubDomains</span></code> directive to the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a>\nheader. It has no effect unless <a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code></a> is set to a\nnon-zero value.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p>Setting this incorrectly can irreversibly (for the value of\n<a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code></a>) break your site. Read the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a> documentation first.</p>\n</aside>\n</section>\n<section id=\"secure-hsts-preload\">\n<span id=\"std-setting-SECURE_HSTS_PRELOAD\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_PRELOAD</span></code><a class=\"heading-anchor\" href=\"#secure-hsts-preload\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>If <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> adds\nthe <code class=\"docutils literal notranslate\"><span class=\"pre\">preload</span></code> directive to the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a>\nheader. It has no effect unless <a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code></a> is set to a\nnon-zero value.</p>\n</section>\n<section id=\"secure-hsts-seconds\">\n<span id=\"std-setting-SECURE_HSTS_SECONDS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code><a class=\"heading-anchor\" href=\"#secure-hsts-seconds\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code></p>\n<p>If set to a non-zero integer value, the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> sets the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a> header on all responses that do not\nalready have it.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p>Setting this incorrectly can irreversibly (for some time) break your site.\nRead the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a> documentation first.</p>\n</aside>\n</section>\n<section id=\"secure-proxy-ssl-header\">\n<span id=\"std-setting-SECURE_PROXY_SSL_HEADER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_PROXY_SSL_HEADER</span></code><a class=\"heading-anchor\" href=\"#secure-proxy-ssl-header\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>A tuple representing a HTTP header/value combination that signifies a request\nis secure. This controls the behavior of the request object's <code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code>\nmethod.</p>\n<p>By default, <code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code> determines if a request is secure by confirming\nthat a requested URL uses <code class=\"docutils literal notranslate\"><span class=\"pre\">https://</span></code>. This method is important for Django's\nCSRF protection, and it may be used by your own code or third-party apps.</p>\n<p>If your Django app is behind a proxy, though, the proxy may be &quot;swallowing&quot;\nwhether the original request uses HTTPS or not. If there is a non-HTTPS\nconnection between the proxy and Django then <code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code> would always\nreturn <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> -- even for requests that were made via HTTPS by the end user.\nIn contrast, if there is an HTTPS connection between the proxy and Django then\n<code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code> would always return <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> -- even for requests that were\nmade originally via HTTP.</p>\n<p>In this situation, configure your proxy to set a custom HTTP header that tells\nDjango whether the request came in via HTTPS, and set\n<code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_PROXY_SSL_HEADER</span></code> so that Django knows what header to look for.</p>\n<p>Set a tuple with two elements -- the name of the header to look for and the\nrequired value. For example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">SECURE_PROXY_SSL_HEADER</span> <span class=\"o\">=</span> <span class=\"p\">(</span><span class=\"s1\">&#39;HTTP_X_FORWARDED_PROTO&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;https&#39;</span><span class=\"p\">)</span>\n</code></pre></div>\n<p>This tells Django to trust the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Proto</span></code> header that comes from our\nproxy, and any time its value is <code class=\"docutils literal notranslate\"><span class=\"pre\">'https'</span></code>, then the request is guaranteed to\nbe secure (i.e., it originally came in via HTTPS).</p>\n<p>You should <em>only</em> set this setting if you control your proxy or have some other\nguarantee that it sets/strips this header appropriately.</p>\n<p>Note that the header needs to be in the format as used by <code class=\"docutils literal notranslate\"><span class=\"pre\">request.META</span></code> --\nall caps and likely starting with <code class=\"docutils literal notranslate\"><span class=\"pre\">HTTP_</span></code>. (Remember, Django automatically\nadds <code class=\"docutils literal notranslate\"><span class=\"pre\">'HTTP_'</span></code> to the start of x-header names before making the header\navailable in <code class=\"docutils literal notranslate\"><span class=\"pre\">request.META</span></code>.)</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p><strong>Modifying this setting can compromise your site's security. Ensure you\nfully understand your setup before changing it.</strong></p>\n<p>Make sure ALL of the following are true before setting this (assuming the\nvalues from the example above):</p>\n<ul class=\"simple\">\n<li><p>Your Django app is behind a proxy.</p></li>\n<li><p>Your proxy strips the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Proto</span></code> header from all incoming\nrequests. In other words, if end users include that header in their\nrequests, the proxy will discard it.</p></li>\n<li><p>Your proxy sets the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Proto</span></code> header and sends it to Django,\nbut only for requests that originally come in via HTTPS.</p></li>\n</ul>\n<p>If any of those are not true, you should keep this setting set to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>\nand find another way of determining HTTPS, perhaps via custom middleware.</p>\n</aside>\n</section>\n<section id=\"secure-redirect-exempt\">\n<span id=\"std-setting-SECURE_REDIRECT_EXEMPT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_REDIRECT_EXEMPT</span></code><a class=\"heading-anchor\" href=\"#secure-redirect-exempt\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>If a URL path matches a regular expression in this list, the request will not be\nredirected to HTTPS. The\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> strips leading slashes\nfrom URL paths, so patterns shouldn't include them, e.g.\n<code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_REDIRECT_EXEMPT</span> <span class=\"pre\">=</span> <span class=\"pre\">[r'^no-ssl/$',</span> <span class=\"pre\">…]</span></code>. If\n<a class=\"reference internal\" href=\"#std-setting-SECURE_SSL_REDIRECT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_SSL_REDIRECT</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>, this setting has no effect.</p>\n</section>\n<section id=\"secure-referrer-policy\">\n<span id=\"std-setting-SECURE_REFERRER_POLICY\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_REFERRER_POLICY</span></code><a class=\"heading-anchor\" href=\"#secure-referrer-policy\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"3.0\">\n<p class=\"version-note-title\">New in Django 3.0</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'same-origin'</span></code></p>\n<p>If configured, the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> sets\nthe <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#referrer-policy\"><span class=\"std std-ref\">Referrer Policy</span></a> header on all responses that do not already have it\nto the value provided.</p>\n<aside class=\"version-note version-changed\" data-version=\"3.1\">\n<p class=\"version-note-title\">Changed in Django 3.1</p><p>In older versions, the default value is <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>.</p>\n</aside>\n</section>\n<section id=\"secure-ssl-host\">\n<span id=\"std-setting-SECURE_SSL_HOST\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_SSL_HOST</span></code><a class=\"heading-anchor\" href=\"#secure-ssl-host\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>If a string (e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">secure.example.com</span></code>), all SSL redirects will be directed\nto this host rather than the originally-requested host\n(e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">www.example.com</span></code>). If <a class=\"reference internal\" href=\"#std-setting-SECURE_SSL_REDIRECT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_SSL_REDIRECT</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>, this\nsetting has no effect.</p>\n</section>\n<section id=\"secure-ssl-redirect\">\n<span id=\"std-setting-SECURE_SSL_REDIRECT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_SSL_REDIRECT</span></code><a class=\"heading-anchor\" href=\"#secure-ssl-redirect\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>If <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the <a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a>\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#ssl-redirect\"><span class=\"std std-ref\">redirects</span></a> all non-HTTPS requests to HTTPS (except for\nthose URLs matching a regular expression listed in\n<a class=\"reference internal\" href=\"#std-setting-SECURE_REDIRECT_EXEMPT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_REDIRECT_EXEMPT</span></code></a>).</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>If turning this to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> causes infinite redirects, it probably means\nyour site is running behind a proxy and can't tell which requests are secure\nand which are not. Your proxy likely sets a header to indicate secure\nrequests; you can correct the problem by finding out what that header is and\nconfiguring the <a class=\"reference internal\" href=\"#std-setting-SECURE_PROXY_SSL_HEADER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_PROXY_SSL_HEADER</span></code></a> setting accordingly.</p>\n</aside>\n</section>\n<section id=\"serialization-modules\">\n<span id=\"std-setting-SERIALIZATION_MODULES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SERIALIZATION_MODULES</span></code><a class=\"heading-anchor\" href=\"#serialization-modules\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: 定義されていません</p>\n<p>A dictionary of modules containing serializer definitions (provided as\nstrings), keyed by a string identifier for that serialization type. For\nexample, to define a YAML serializer, use:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">SERIALIZATION_MODULES</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"s1\">&#39;yaml&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;path.to.yaml_serializer&#39;</span><span class=\"p\">}</span>\n</code></pre></div>\n</section>\n<section id=\"server-email\">\n<span id=\"std-setting-SERVER_EMAIL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SERVER_EMAIL</span></code><a class=\"heading-anchor\" href=\"#server-email\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'root&#64;localhost'</span></code></p>\n<p>The email address that error messages come from, such as those sent to\n<a class=\"reference internal\" href=\"#std-setting-ADMINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-MANAGERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code></a>.</p>\n<aside class=\"admonition-why-are-my-emails-sent-from-a-different-address admonition\">\n<p class=\"admonition-title\">Why are my emails sent from a different address?</p>\n<p>This address is used only for error messages. It is <em>not</em> the address that\nregular email messages sent with <a class=\"reference internal\" href=\"/ja/3.1/topics/email/#django.core.mail.send_mail\" title=\"django.core.mail.send_mail\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">send_mail()</span></code></a>\ncome from; for that, see <a class=\"reference internal\" href=\"#std-setting-DEFAULT_FROM_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_FROM_EMAIL</span></code></a>.</p>\n</aside>\n</section>\n<section id=\"short-date-format\">\n<span id=\"std-setting-SHORT_DATE_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code><a class=\"heading-anchor\" href=\"#short-date-format\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'m/d/Y'</span></code> (例: <code class=\"docutils literal notranslate\"><span class=\"pre\">12/31/2003</span></code>)</p>\n<p>An available formatting that can be used for displaying date fields on\ntemplates. Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the\ncorresponding locale-dictated format has higher precedence and will be applied.\nSee <a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-SHORT_DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATETIME_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"short-datetime-format\">\n<span id=\"std-setting-SHORT_DATETIME_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SHORT_DATETIME_FORMAT</span></code><a class=\"heading-anchor\" href=\"#short-datetime-format\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'m/d/Y</span> <span class=\"pre\">P'</span></code> (例: <code class=\"docutils literal notranslate\"><span class=\"pre\">12/31/2003</span> <span class=\"pre\">4</span> <span class=\"pre\">p.m.</span></code>)</p>\n<p>An available formatting that can be used for displaying datetime fields on\ntemplates. Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the\ncorresponding locale-dictated format has higher precedence and will be applied.\nSee <a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-SHORT_DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"signing-backend\">\n<span id=\"std-setting-SIGNING_BACKEND\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SIGNING_BACKEND</span></code><a class=\"heading-anchor\" href=\"#signing-backend\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'django.core.signing.TimestampSigner'</span></code></p>\n<p>The backend used for signing cookies and other data.</p>\n<p>See also the <a class=\"reference internal\" href=\"/ja/3.1/topics/signing/\"><span class=\"doc\">暗号署名</span></a> documentation.</p>\n</section>\n<section id=\"silenced-system-checks\">\n<span id=\"std-setting-SILENCED_SYSTEM_CHECKS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SILENCED_SYSTEM_CHECKS</span></code><a class=\"heading-anchor\" href=\"#silenced-system-checks\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>A list of identifiers of messages generated by the system check framework\n(i.e. <code class=\"docutils literal notranslate\"><span class=\"pre\">[&quot;models.W001&quot;]</span></code>) that you wish to permanently acknowledge and ignore.\nSilenced checks will not be output to the console.</p>\n<p>See also the <a class=\"reference internal\" href=\"/ja/3.1/ref/checks/\"><span class=\"doc\">System check framework</span></a> documentation.</p>\n</section>\n<section id=\"templates\">\n<span id=\"std-setting-TEMPLATES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TEMPLATES</span></code><a class=\"heading-anchor\" href=\"#templates\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>A list containing the settings for all template engines to be used with\nDjango. Each item of the list is a dictionary containing the options for an\nindividual engine.</p>\n<p>Here's a setup that tells the Django template engine to load templates from the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">templates</span></code> subdirectory inside each installed application:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">TEMPLATES</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"p\">{</span>\n        <span class=\"s1\">&#39;BACKEND&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;django.template.backends.django.DjangoTemplates&#39;</span><span class=\"p\">,</span>\n        <span class=\"s1\">&#39;APP_DIRS&#39;</span><span class=\"p\">:</span> <span class=\"kc\">True</span><span class=\"p\">,</span>\n    <span class=\"p\">},</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>The following options are available for all backends.</p>\n<section id=\"std-setting-TEMPLATES-BACKEND\">\n<span id=\"id7\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">BACKEND</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEMPLATES-BACKEND\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: 定義されていません</p>\n<p>The template backend to use. The built-in template backends are:</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.template.backends.django.DjangoTemplates'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.template.backends.jinja2.Jinja2'</span></code></p></li>\n</ul>\n<p>You can use a template backend that doesn't ship with Django by setting\n<code class=\"docutils literal notranslate\"><span class=\"pre\">BACKEND</span></code> to a fully-qualified path (i.e. <code class=\"docutils literal notranslate\"><span class=\"pre\">'mypackage.whatever.Backend'</span></code>).</p>\n</section>\n<section id=\"std-setting-TEMPLATES-NAME\">\n<span id=\"id8\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">NAME</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEMPLATES-NAME\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: 下記をご覧ください</p>\n<p>The alias for this particular template engine. It's an identifier that allows\nselecting an engine for rendering. Aliases must be unique across all\nconfigured template engines.</p>\n<p>It defaults to the name of the module defining the engine class, i.e. the\nnext to last piece of <a class=\"reference internal\" href=\"#std-setting-TEMPLATES-BACKEND\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">BACKEND</span></code></a>, when it isn't\nprovided. For example if the backend is <code class=\"docutils literal notranslate\"><span class=\"pre\">'mypackage.whatever.Backend'</span></code> then\nits default name is <code class=\"docutils literal notranslate\"><span class=\"pre\">'whatever'</span></code>.</p>\n</section>\n<section id=\"dirs\">\n<span id=\"std-setting-TEMPLATES-DIRS\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">DIRS</span></code><a class=\"heading-anchor\" href=\"#dirs\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>Directories where the engine should look for template source files, in search\norder.</p>\n</section>\n<section id=\"app-dirs\">\n<span id=\"std-setting-TEMPLATES-APP_DIRS\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">APP_DIRS</span></code><a class=\"heading-anchor\" href=\"#app-dirs\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether the engine should look for template source files inside installed\napplications.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>The default <code class=\"file docutils literal notranslate\"><span class=\"pre\">settings.py</span></code> file created by <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> sets <code class=\"docutils literal notranslate\"><span class=\"pre\">'APP_DIRS':</span> <span class=\"pre\">True</span></code>.</p>\n</aside>\n</section>\n<section id=\"std-setting-TEMPLATES-OPTIONS\">\n<span id=\"id9\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">OPTIONS</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEMPLATES-OPTIONS\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (空のディクショナリ)</p>\n<p>Extra parameters to pass to the template backend. Available parameters vary\ndepending on the template backend. See\n<a class=\"reference internal\" href=\"/ja/3.1/topics/templates/#django.template.backends.django.DjangoTemplates\" title=\"django.template.backends.django.DjangoTemplates\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">DjangoTemplates</span></code></a> and\n<a class=\"reference internal\" href=\"/ja/3.1/topics/templates/#django.template.backends.jinja2.Jinja2\" title=\"django.template.backends.jinja2.Jinja2\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">Jinja2</span></code></a> for the options of the\nbuilt-in backends.</p>\n</section>\n</section>\n<section id=\"test-runner\">\n<span id=\"std-setting-TEST_RUNNER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TEST_RUNNER</span></code><a class=\"heading-anchor\" href=\"#test-runner\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'django.test.runner.DiscoverRunner'</span></code></p>\n<p>The name of the class to use for starting the test suite. See\n<a class=\"reference internal\" href=\"/ja/3.1/topics/testing/advanced/#other-testing-frameworks\"><span class=\"std std-ref\">Using different testing frameworks</span></a>.</p>\n</section>\n<section id=\"test-non-serialized-apps\">\n<span id=\"std-setting-TEST_NON_SERIALIZED_APPS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TEST_NON_SERIALIZED_APPS</span></code><a class=\"heading-anchor\" href=\"#test-non-serialized-apps\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>In order to restore the database state between tests for\n<code class=\"docutils literal notranslate\"><span class=\"pre\">TransactionTestCase</span></code>s and database backends without transactions, Django\nwill <a class=\"reference internal\" href=\"/ja/3.1/topics/testing/overview/#test-case-serialized-rollback\"><span class=\"std std-ref\">serialize the contents of all apps</span></a>\nwhen it starts the test run so it can then reload from that copy before running\ntests that need it.</p>\n<p>This slows down the startup time of the test runner; if you have apps that\nyou know don't need this feature, you can add their full names in here (e.g.\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.contenttypes'</span></code>) to exclude them from this serialization\nprocess.</p>\n</section>\n<section id=\"thousand-separator\">\n<span id=\"std-setting-THOUSAND_SEPARATOR\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code><a class=\"heading-anchor\" href=\"#thousand-separator\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">','</span></code> (カンマ)</p>\n<p>Default thousand separator used when formatting numbers. This setting is\nused only when <a class=\"reference internal\" href=\"#std-setting-USE_THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_THOUSAND_SEPARATOR</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> and\n<a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a> is greater than <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code>.</p>\n<p>Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the locale-dictated\nformat has higher precedence and will be applied instead.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-DECIMAL_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DECIMAL_SEPARATOR</span></code></a> and\n<a class=\"reference internal\" href=\"#std-setting-USE_THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_THOUSAND_SEPARATOR</span></code></a>.</p>\n</section>\n<section id=\"time-format\">\n<span id=\"std-setting-TIME_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code><a class=\"heading-anchor\" href=\"#time-format\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'P'</span></code> (例: <code class=\"docutils literal notranslate\"><span class=\"pre\">4</span> <span class=\"pre\">p.m.</span></code>)</p>\n<p>The default formatting to use for displaying time fields in any part of the\nsystem. Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the\nlocale-dictated format has higher precedence and will be applied instead. See\n<a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"time-input-formats\">\n<span id=\"std-setting-TIME_INPUT_FORMATS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_INPUT_FORMATS</span></code><a class=\"heading-anchor\" href=\"#time-input-formats\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[</span>\n    <span class=\"s1\">&#39;%H:%M:%S&#39;</span><span class=\"p\">,</span>     <span class=\"c1\"># &#39;14:30:59&#39;</span>\n    <span class=\"s1\">&#39;%H:%M:%S.</span><span class=\"si\">%f</span><span class=\"s1\">&#39;</span><span class=\"p\">,</span>  <span class=\"c1\"># &#39;14:30:59.000200&#39;</span>\n    <span class=\"s1\">&#39;%H:%M&#39;</span><span class=\"p\">,</span>        <span class=\"c1\"># &#39;14:30&#39;</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>A list of formats that will be accepted when inputting data on a time field.\nFormats will be tried in order, using the first valid one. Note that these\nformat strings use Python's <a class=\"reference external\" href=\"https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior\" title=\"(in Python v3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">date</span></code></a>\ntemplate filter.</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the locale-dictated format has higher\nprecedence and will be applied instead.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-DATETIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_INPUT_FORMATS</span></code></a>.</p>\n</section>\n<section id=\"std-setting-TIME_ZONE\">\n<span id=\"id10\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code><a class=\"heading-anchor\" href=\"#std-setting-TIME_ZONE\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'America/Chicago'</span></code></p>\n<p>A string representing the time zone for this installation. See the <a class=\"reference external\" href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">list of\ntime zones</a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>Django は最初 <a class=\"reference internal\" href=\"#std-setting-TIME_ZONE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code></a> を <code class=\"docutils literal notranslate\"><span class=\"pre\">'America/Chicago'</span></code> にしてリリースされていたので、後方互換性のために (プロジェクト内で <code class=\"docutils literal notranslate\"><span class=\"pre\">settings.py</span></code> が定義されていないときに使われる) グローバル設定は <code class=\"docutils literal notranslate\"><span class=\"pre\">'America/Chicago'</span></code> のままになっています。新しいプロジェクトのテンプレートではデフォルトは <code class=\"docutils literal notranslate\"><span class=\"pre\">'UTC'</span></code> です。</p>\n</aside>\n<p>これは必ずしもサーバのタイムゾーンではないことに注意してください。例えば、1 つのサーバ内に Django 製のサイトがあり、それぞれが異なるタイムゾーン設定を持つこともできます。</p>\n<p><a class=\"reference internal\" href=\"#std-setting-USE_TZ\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code></a> が <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> のとき、これは Django が日時を保持するタイムゾーンとなります。<a class=\"reference internal\" href=\"#std-setting-USE_TZ\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code></a> が <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> のとき、これは Django がテンプレート内で日時を表示するため、およびフォーム内で入力された日時を解釈するために使う、デフォルトのタイムゾーンです。</p>\n<p>On Unix environments (where <a class=\"reference external\" href=\"https://docs.python.org/3/library/time.html#time.tzset\" title=\"(in Python v3.14)\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">time.tzset()</span></code></a> is implemented), Django sets the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">os.environ['TZ']</span></code> variable to the time zone you specify in the\n<a class=\"reference internal\" href=\"#std-setting-TIME_ZONE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code></a> setting. Thus, all your views and models will\nautomatically operate in this time zone. However, Django won't set the <code class=\"docutils literal notranslate\"><span class=\"pre\">TZ</span></code>\nenvironment variable if you're using the manual configuration option as\ndescribed in <a class=\"reference internal\" href=\"/ja/3.1/topics/settings/#settings-without-django-settings-module\"><span class=\"std std-ref\">manually configuring settings</span></a>. If Django doesn't set the <code class=\"docutils literal notranslate\"><span class=\"pre\">TZ</span></code>\nenvironment variable, it's up to you to ensure your processes are running in\nthe correct environment.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>Django は、Windows 環境で代替タイムゾーンを正しく扱うことができません。Django を Windows で実行している場合、<a class=\"reference internal\" href=\"#std-setting-TIME_ZONE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code></a> はシステムのタイムゾーンに合わせてセットする必要があります。</p>\n</aside>\n</section>\n<section id=\"use-i18n\">\n<span id=\"std-setting-USE_I18N\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_I18N</span></code><a class=\"heading-anchor\" href=\"#use-i18n\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code></p>\n<p>A boolean that specifies whether Django's translation system should be enabled.\nThis provides a way to turn it off, for performance. If this is set to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>, Django will make some optimizations so as not to load the\ntranslation machinery.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-LANGUAGE_CODE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_CODE</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-USE_TZ\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code></a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>The default <code class=\"file docutils literal notranslate\"><span class=\"pre\">settings.py</span></code> file created by <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> includes <code class=\"docutils literal notranslate\"><span class=\"pre\">USE_I18N</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code> for convenience.</p>\n</aside>\n</section>\n<section id=\"use-l10n\">\n<span id=\"std-setting-USE_L10N\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code><a class=\"heading-anchor\" href=\"#use-l10n\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>A boolean that specifies if localized formatting of data will be enabled by\ndefault or not. If this is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, e.g. Django will display numbers and\ndates using the format of the current locale.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-LANGUAGE_CODE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_CODE</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-USE_I18N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_I18N</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-USE_TZ\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code></a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>The default <code class=\"file docutils literal notranslate\"><span class=\"pre\">settings.py</span></code> file created by <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> includes <code class=\"docutils literal notranslate\"><span class=\"pre\">USE_L10N</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code> for convenience.</p>\n</aside>\n</section>\n<section id=\"use-thousand-separator\">\n<span id=\"std-setting-USE_THOUSAND_SEPARATOR\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_THOUSAND_SEPARATOR</span></code><a class=\"heading-anchor\" href=\"#use-thousand-separator\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>A boolean that specifies whether to display numbers using a thousand separator.\nWhen set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> and <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is also <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, Django will\nformat numbers using the <a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a> and\n<a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a> settings. These settings may also be dictated by\nthe locale, which takes precedence.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DECIMAL_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DECIMAL_SEPARATOR</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a> and\n<a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a>.</p>\n</section>\n<section id=\"use-tz\">\n<span id=\"std-setting-USE_TZ\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code><a class=\"heading-anchor\" href=\"#use-tz\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>A boolean that specifies if datetimes will be timezone-aware by default or not.\nIf this is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, Django will use timezone-aware datetimes internally.</p>\n<p>When <code class=\"docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code> is False, Django will use naive datetimes in local time, except\nwhen parsing ISO 8601 formatted strings, where timezone information will always\nbe retained if present.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-TIME_ZONE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-USE_I18N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_I18N</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>The default <code class=\"file docutils literal notranslate\"><span class=\"pre\">settings.py</span></code> file created by\n<a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span> <span class=\"pre\">startproject</span></code></a> includes\n<code class=\"docutils literal notranslate\"><span class=\"pre\">USE_TZ</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code> for convenience.</p>\n</aside>\n</section>\n<section id=\"use-x-forwarded-host\">\n<span id=\"std-setting-USE_X_FORWARDED_HOST\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_HOST</span></code><a class=\"heading-anchor\" href=\"#use-x-forwarded-host\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>A boolean that specifies whether to use the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Host</span></code> header in\npreference to the <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> header. This should only be enabled if a proxy\nwhich sets this header is in use.</p>\n<p>This setting takes priority over <a class=\"reference internal\" href=\"#std-setting-USE_X_FORWARDED_PORT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_PORT</span></code></a>. Per\n<span class=\"target\" id=\"index-0\"></span><a class=\"rfc reference external\" href=\"https://datatracker.ietf.org/doc/html/rfc7239.html#section-5.3\"><strong>RFC 7239 Section 5.3</strong></a>, the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Host</span></code> header can include the port\nnumber, in which case you shouldn't use <a class=\"reference internal\" href=\"#std-setting-USE_X_FORWARDED_PORT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_PORT</span></code></a>.</p>\n</section>\n<section id=\"use-x-forwarded-port\">\n<span id=\"std-setting-USE_X_FORWARDED_PORT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_PORT</span></code><a class=\"heading-anchor\" href=\"#use-x-forwarded-port\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>A boolean that specifies whether to use the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Port</span></code> header in\npreference to the <code class=\"docutils literal notranslate\"><span class=\"pre\">SERVER_PORT</span></code> <code class=\"docutils literal notranslate\"><span class=\"pre\">META</span></code> variable. This should only be\nenabled if a proxy which sets this header is in use.</p>\n<p><a class=\"reference internal\" href=\"#std-setting-USE_X_FORWARDED_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_HOST</span></code></a> takes priority over this setting.</p>\n</section>\n<section id=\"wsgi-application\">\n<span id=\"std-setting-WSGI_APPLICATION\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">WSGI_APPLICATION</span></code><a class=\"heading-anchor\" href=\"#wsgi-application\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The full Python path of the WSGI application object that Django's built-in\nservers (e.g. <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a>) will use. The <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> management command will create a standard\n<code class=\"docutils literal notranslate\"><span class=\"pre\">wsgi.py</span></code> file with an <code class=\"docutils literal notranslate\"><span class=\"pre\">application</span></code> callable in it, and point this setting\nto that <code class=\"docutils literal notranslate\"><span class=\"pre\">application</span></code>.</p>\n<p>If not set, the return value of <code class=\"docutils literal notranslate\"><span class=\"pre\">django.core.wsgi.get_wsgi_application()</span></code>\nwill be used. In this case, the behavior of <a class=\"reference internal\" href=\"/ja/3.1/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a> will be\nidentical to previous Django versions.</p>\n</section>\n<section id=\"year-month-format\">\n<span id=\"std-setting-YEAR_MONTH_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">YEAR_MONTH_FORMAT</span></code><a class=\"heading-anchor\" href=\"#year-month-format\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'F</span> <span class=\"pre\">Y'</span></code></p>\n<p>The default formatting to use for date fields on Django admin change-list\npages -- and, possibly, by other parts of the system -- in cases when only the\nyear and month are displayed.</p>\n<p>For example, when a Django admin change-list page is being filtered by a date\ndrilldown, the header for a given month displays the month and the year.\nDifferent locales have different formats. For example, U.S. English would say\n&quot;January 2006,&quot; whereas another locale might say &quot;2006/January.&quot;</p>\n<p><a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> を <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> に設定すると、ロケールに基づいた対応するフォーマットが高い優先度で適用されるので気をつけてください。</p>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>. See also\n<a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a>\nand <a class=\"reference internal\" href=\"#std-setting-MONTH_DAY_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MONTH_DAY_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"x-frame-options\">\n<span id=\"std-setting-X_FRAME_OPTIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">X_FRAME_OPTIONS</span></code><a class=\"heading-anchor\" href=\"#x-frame-options\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'DENY'</span></code></p>\n<p>The default value for the X-Frame-Options header used by\n<a class=\"reference internal\" href=\"/ja/3.1/ref/middleware/#django.middleware.clickjacking.XFrameOptionsMiddleware\" title=\"django.middleware.clickjacking.XFrameOptionsMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">XFrameOptionsMiddleware</span></code></a>. See the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/clickjacking/\"><span class=\"doc\">clickjacking protection</span></a> documentation.</p>\n<aside class=\"version-note version-changed\" data-version=\"3.0\">\n<p class=\"version-note-title\">Changed in Django 3.0</p><p>In older versions, the default value is <code class=\"docutils literal notranslate\"><span class=\"pre\">SAMEORIGIN</span></code>.</p>\n</aside>\n</section>\n</section>\n<section id=\"auth\">\n<h2><a class=\"toc-backref\" href=\"#id14\" role=\"doc-backlink\">Auth</a><a class=\"headerlink\" href=\"#auth\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/#module-django.contrib.auth\" title=\"django.contrib.auth: Django's authentication framework.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.auth</span></code></a>.</p>\n<section id=\"authentication-backends\">\n<span id=\"std-setting-AUTHENTICATION_BACKENDS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">AUTHENTICATION_BACKENDS</span></code><a class=\"heading-anchor\" href=\"#authentication-backends\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">['django.contrib.auth.backends.ModelBackend']</span></code></p>\n<p>A list of authentication backend classes (as strings) to use when attempting to\nauthenticate a user. See the <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/customizing/#authentication-backends\"><span class=\"std std-ref\">authentication backends documentation</span></a> for details.</p>\n</section>\n<section id=\"auth-user-model\">\n<span id=\"std-setting-AUTH_USER_MODEL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">AUTH_USER_MODEL</span></code><a class=\"heading-anchor\" href=\"#auth-user-model\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'auth.User'</span></code></p>\n<p>User を表すために使うモデルです。<a class=\"reference internal\" href=\"/ja/3.1/topics/auth/customizing/#auth-custom-user\"><span class=\"std std-ref\">カスタムの User モデルを置き換える</span></a> を参照してください。</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p>You cannot change the AUTH_USER_MODEL setting during the lifetime of\na project (i.e. once you have made and migrated models that depend on it)\nwithout serious effort. It is intended to be set at the project start,\nand the model it refers to must be available in the first migration of\nthe app that it lives in.\nSee <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/customizing/#auth-custom-user\"><span class=\"std std-ref\">カスタムの User モデルを置き換える</span></a> for more details.</p>\n</aside>\n</section>\n<section id=\"login-redirect-url\">\n<span id=\"std-setting-LOGIN_REDIRECT_URL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LOGIN_REDIRECT_URL</span></code><a class=\"heading-anchor\" href=\"#login-redirect-url\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'/accounts/profile/'</span></code></p>\n<p>The URL or <a class=\"reference internal\" href=\"/ja/3.1/topics/http/urls/#naming-url-patterns\"><span class=\"std std-ref\">named URL pattern</span></a> where requests are\nredirected after login when the <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/default/#django.contrib.auth.views.LoginView\" title=\"django.contrib.auth.views.LoginView\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">LoginView</span></code></a>\ndoesn't get a <code class=\"docutils literal notranslate\"><span class=\"pre\">next</span></code> GET parameter.</p>\n</section>\n<section id=\"login-url\">\n<span id=\"std-setting-LOGIN_URL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LOGIN_URL</span></code><a class=\"heading-anchor\" href=\"#login-url\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'/accounts/login/'</span></code></p>\n<p>The URL or <a class=\"reference internal\" href=\"/ja/3.1/topics/http/urls/#naming-url-patterns\"><span class=\"std std-ref\">named URL pattern</span></a> where requests are\nredirected for login when using the\n<a class=\"reference internal\" href=\"/ja/3.1/topics/auth/default/#django.contrib.auth.decorators.login_required\" title=\"django.contrib.auth.decorators.login_required\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">login_required()</span></code></a> decorator,\n<a class=\"reference internal\" href=\"/ja/3.1/topics/auth/default/#django.contrib.auth.mixins.LoginRequiredMixin\" title=\"django.contrib.auth.mixins.LoginRequiredMixin\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">LoginRequiredMixin</span></code></a>, or\n<a class=\"reference internal\" href=\"/ja/3.1/topics/auth/default/#django.contrib.auth.mixins.AccessMixin\" title=\"django.contrib.auth.mixins.AccessMixin\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">AccessMixin</span></code></a>.</p>\n</section>\n<section id=\"logout-redirect-url\">\n<span id=\"std-setting-LOGOUT_REDIRECT_URL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LOGOUT_REDIRECT_URL</span></code><a class=\"heading-anchor\" href=\"#logout-redirect-url\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The URL or <a class=\"reference internal\" href=\"/ja/3.1/topics/http/urls/#naming-url-patterns\"><span class=\"std std-ref\">named URL pattern</span></a> where requests are\nredirected after logout if <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/default/#django.contrib.auth.views.LogoutView\" title=\"django.contrib.auth.views.LogoutView\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">LogoutView</span></code></a>\ndoesn't have a <code class=\"docutils literal notranslate\"><span class=\"pre\">next_page</span></code> attribute.</p>\n<p>If <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, no redirect will be performed and the logout view will be\nrendered.</p>\n</section>\n<section id=\"password-reset-timeout\">\n<span id=\"std-setting-PASSWORD_RESET_TIMEOUT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">PASSWORD_RESET_TIMEOUT</span></code><a class=\"heading-anchor\" href=\"#password-reset-timeout\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"3.1\">\n<p class=\"version-note-title\">New in Django 3.1</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">259200</span></code> (3 days, in seconds)</p>\n<p>The number of seconds a password reset link is valid for.</p>\n<p>Used by the <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/default/#django.contrib.auth.views.PasswordResetConfirmView\" title=\"django.contrib.auth.views.PasswordResetConfirmView\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">PasswordResetConfirmView</span></code></a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>Reducing the value of this timeout doesn't make any difference to the\nability of an attacker to brute-force a password reset token. Tokens are\ndesigned to be safe from brute-forcing without any timeout.</p>\n<p>This timeout exists to protect against some unlikely attack scenarios, such\nas someone gaining access to email archives that may contain old, unused\npassword reset tokens.</p>\n</aside>\n</section>\n<section id=\"password-reset-timeout-days\">\n<span id=\"std-setting-PASSWORD_RESET_TIMEOUT_DAYS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">PASSWORD_RESET_TIMEOUT_DAYS</span></code><a class=\"heading-anchor\" href=\"#password-reset-timeout-days\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">3</span></code></p>\n<p>The number of days a password reset link is valid for.</p>\n<p>Used by the <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/default/#django.contrib.auth.views.PasswordResetConfirmView\" title=\"django.contrib.auth.views.PasswordResetConfirmView\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">PasswordResetConfirmView</span></code></a>.</p>\n<aside class=\"version-note version-deprecated\" data-version=\"3.1\">\n<p class=\"version-note-title\">Deprecated since Django 3.1</p><p><span class=\"versionmodified deprecated\">バージョン 3.1 で非推奨: </span>This setting is deprecated. Use <a class=\"reference internal\" href=\"#std-setting-PASSWORD_RESET_TIMEOUT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">PASSWORD_RESET_TIMEOUT</span></code></a> instead.</p>\n</aside>\n</section>\n<section id=\"password-hashers\">\n<span id=\"std-setting-PASSWORD_HASHERS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">PASSWORD_HASHERS</span></code><a class=\"heading-anchor\" href=\"#password-hashers\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/passwords/#auth-password-storage\"><span class=\"std std-ref\">Djangoのパスワード保存方法</span></a>.</p>\n<p>デフォルト値:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[</span>\n    <span class=\"s1\">&#39;django.contrib.auth.hashers.PBKDF2PasswordHasher&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.contrib.auth.hashers.Argon2PasswordHasher&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.contrib.auth.hashers.BCryptSHA256PasswordHasher&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n</section>\n<section id=\"auth-password-validators\">\n<span id=\"std-setting-AUTH_PASSWORD_VALIDATORS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">AUTH_PASSWORD_VALIDATORS</span></code><a class=\"heading-anchor\" href=\"#auth-password-validators\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>The list of validators that are used to check the strength of user's passwords.\nSee <a class=\"reference internal\" href=\"/ja/3.1/topics/auth/passwords/#password-validation\"><span class=\"std std-ref\">パスワードの妥当性検証</span></a> for more details. By default, no validation is\nperformed and all passwords are accepted.</p>\n</section>\n</section>\n<section id=\"messages\">\n<span id=\"settings-messages\"></span><h2><a class=\"toc-backref\" href=\"#id15\" role=\"doc-backlink\">メッセージ</a><a class=\"headerlink\" href=\"#messages\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#module-django.contrib.messages\" title=\"django.contrib.messages: Provides cookie- and session-based temporary message storage.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.messages</span></code></a>.</p>\n<section id=\"message-level\">\n<span id=\"std-setting-MESSAGE_LEVEL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MESSAGE_LEVEL</span></code><a class=\"heading-anchor\" href=\"#message-level\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">messages.INFO</span></code></p>\n<p>Sets the minimum message level that will be recorded by the messages\nframework. See <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#message-level\"><span class=\"std std-ref\">message levels</span></a> for more details.</p>\n<aside class=\"admonition-important admonition\">\n<p class=\"admonition-title\">Important</p>\n<p>If you override <code class=\"docutils literal notranslate\"><span class=\"pre\">MESSAGE_LEVEL</span></code> in your settings file and rely on any of\nthe built-in constants, you must import the constants module directly to\navoid the potential for circular imports, e.g.:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.contrib.messages</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">constants</span> <span class=\"k\">as</span> <span class=\"n\">message_constants</span>\n<span class=\"n\">MESSAGE_LEVEL</span> <span class=\"o\">=</span> <span class=\"n\">message_constants</span><span class=\"o\">.</span><span class=\"n\">DEBUG</span>\n</code></pre></div>\n<p>If desired, you may specify the numeric values for the constants directly\naccording to the values in the above <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#message-level-constants\"><span class=\"std std-ref\">constants table</span></a>.</p>\n</aside>\n</section>\n<section id=\"message-storage\">\n<span id=\"std-setting-MESSAGE_STORAGE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MESSAGE_STORAGE</span></code><a class=\"heading-anchor\" href=\"#message-storage\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.messages.storage.fallback.FallbackStorage'</span></code></p>\n<p>Controls where Django stores message data. Valid values are:</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.messages.storage.fallback.FallbackStorage'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.messages.storage.session.SessionStorage'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.messages.storage.cookie.CookieStorage'</span></code></p></li>\n</ul>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#message-storage-backends\"><span class=\"std std-ref\">message storage backends</span></a> for more details.</p>\n<p>The backends that use cookies --\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#django.contrib.messages.storage.cookie.CookieStorage\" title=\"django.contrib.messages.storage.cookie.CookieStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">CookieStorage</span></code></a> and\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#django.contrib.messages.storage.fallback.FallbackStorage\" title=\"django.contrib.messages.storage.fallback.FallbackStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">FallbackStorage</span></code></a> --\nuse the value of <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_DOMAIN\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_DOMAIN</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SECURE</span></code></a>\nand <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_HTTPONLY</span></code></a> when setting their cookies.</p>\n</section>\n<section id=\"message-tags\">\n<span id=\"std-setting-MESSAGE_TAGS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MESSAGE_TAGS</span></code><a class=\"heading-anchor\" href=\"#message-tags\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">{</span>\n    <span class=\"n\">messages</span><span class=\"o\">.</span><span class=\"n\">DEBUG</span><span class=\"p\">:</span> <span class=\"s1\">&#39;debug&#39;</span><span class=\"p\">,</span>\n    <span class=\"n\">messages</span><span class=\"o\">.</span><span class=\"n\">INFO</span><span class=\"p\">:</span> <span class=\"s1\">&#39;info&#39;</span><span class=\"p\">,</span>\n    <span class=\"n\">messages</span><span class=\"o\">.</span><span class=\"n\">SUCCESS</span><span class=\"p\">:</span> <span class=\"s1\">&#39;success&#39;</span><span class=\"p\">,</span>\n    <span class=\"n\">messages</span><span class=\"o\">.</span><span class=\"n\">WARNING</span><span class=\"p\">:</span> <span class=\"s1\">&#39;warning&#39;</span><span class=\"p\">,</span>\n    <span class=\"n\">messages</span><span class=\"o\">.</span><span class=\"n\">ERROR</span><span class=\"p\">:</span> <span class=\"s1\">&#39;error&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">}</span>\n</code></pre></div>\n<p>This sets the mapping of message level to message tag, which is typically\nrendered as a CSS class in HTML. If you specify a value, it will extend\nthe default. This means you only have to specify those values which you need\nto override. See <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#message-displaying\"><span class=\"std std-ref\">メッセージを表示する</span></a> above for more details.</p>\n<aside class=\"admonition-important admonition\">\n<p class=\"admonition-title\">Important</p>\n<p>If you override <code class=\"docutils literal notranslate\"><span class=\"pre\">MESSAGE_TAGS</span></code> in your settings file and rely on any of\nthe built-in constants, you must import the <code class=\"docutils literal notranslate\"><span class=\"pre\">constants</span></code> module directly to\navoid the potential for circular imports, e.g.:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.contrib.messages</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">constants</span> <span class=\"k\">as</span> <span class=\"n\">message_constants</span>\n<span class=\"n\">MESSAGE_TAGS</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"n\">message_constants</span><span class=\"o\">.</span><span class=\"n\">INFO</span><span class=\"p\">:</span> <span class=\"s1\">&#39;&#39;</span><span class=\"p\">}</span>\n</code></pre></div>\n<p>If desired, you may specify the numeric values for the constants directly\naccording to the values in the above <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#message-level-constants\"><span class=\"std std-ref\">constants table</span></a>.</p>\n</aside>\n</section>\n</section>\n<section id=\"sessions\">\n<span id=\"settings-sessions\"></span><h2><a class=\"toc-backref\" href=\"#id16\" role=\"doc-backlink\">セッション</a><a class=\"headerlink\" href=\"#sessions\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/ja/3.1/topics/http/sessions/#module-django.contrib.sessions\" title=\"django.contrib.sessions: Provides session management for Django projects.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.sessions</span></code></a>.</p>\n<section id=\"session-cache-alias\">\n<span id=\"std-setting-SESSION_CACHE_ALIAS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_CACHE_ALIAS</span></code><a class=\"heading-anchor\" href=\"#session-cache-alias\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'default'</span></code></p>\n<p>If you're using <a class=\"reference internal\" href=\"/ja/3.1/topics/http/sessions/#cached-sessions-backend\"><span class=\"std std-ref\">cache-based session storage</span></a>,\nthis selects the cache to use.</p>\n</section>\n<section id=\"session-cookie-age\">\n<span id=\"std-setting-SESSION_COOKIE_AGE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_AGE</span></code><a class=\"heading-anchor\" href=\"#session-cookie-age\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">1209600</span></code> (2 週間の秒表記)</p>\n<p>The age of session cookies, in seconds.</p>\n</section>\n<section id=\"session-cookie-domain\">\n<span id=\"std-setting-SESSION_COOKIE_DOMAIN\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_DOMAIN</span></code><a class=\"heading-anchor\" href=\"#session-cookie-domain\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The domain to use for session cookies. Set this to a string such as\n<code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;example.com&quot;</span></code> for cross-domain cookies, or use <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for a standard\ndomain cookie.</p>\n<p>To use cross-domain cookies with <a class=\"reference internal\" href=\"#std-setting-CSRF_USE_SESSIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_USE_SESSIONS</span></code></a>, you must include\na leading dot (e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;.example.com&quot;</span></code>) to accommodate the CSRF middleware's\nreferer checking.</p>\n<p>Be cautious when updating this setting on a production site. If you update\nthis setting to enable cross-domain cookies on a site that previously used\nstandard domain cookies, existing user cookies will be set to the old\ndomain. This may result in them being unable to log in as long as these cookies\npersist.</p>\n<p>This setting also affects cookies set by <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/messages/#module-django.contrib.messages\" title=\"django.contrib.messages: Provides cookie- and session-based temporary message storage.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.messages</span></code></a>.</p>\n</section>\n<section id=\"session-cookie-httponly\">\n<span id=\"std-setting-SESSION_COOKIE_HTTPONLY\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_HTTPONLY</span></code><a class=\"heading-anchor\" href=\"#session-cookie-httponly\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code></p>\n<p>Whether to use <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpOnly</span></code> flag on the session cookie. If this is set to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, client-side JavaScript will not be able to access the session\ncookie.</p>\n<p><a class=\"reference external\" href=\"https://owasp.org/www-community/HttpOnly\">HttpOnly</a> is a flag included in a Set-Cookie HTTP response header. It's part of\nthe <span class=\"target\" id=\"index-1\"></span><a class=\"rfc reference external\" href=\"https://datatracker.ietf.org/doc/html/rfc6265.html#section-4.1.2.6\"><strong>RFC 6265 Section 4.1.2.6</strong></a> standard for cookies and can be a useful way to\nmitigate the risk of a client-side script accessing the protected cookie data.</p>\n<p>This makes it less trivial for an attacker to escalate a cross-site scripting\nvulnerability into full hijacking of a user's session. There aren't many good\nreasons for turning this off. Your code shouldn't read session cookies from\nJavaScript.</p>\n</section>\n<section id=\"session-cookie-name\">\n<span id=\"std-setting-SESSION_COOKIE_NAME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_NAME</span></code><a class=\"heading-anchor\" href=\"#session-cookie-name\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'sessionid'</span></code></p>\n<p>The name of the cookie to use for sessions. This can be whatever you want\n(as long as it's different from the other cookie names in your application).</p>\n</section>\n<section id=\"session-cookie-path\">\n<span id=\"std-setting-SESSION_COOKIE_PATH\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_PATH</span></code><a class=\"heading-anchor\" href=\"#session-cookie-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'/'</span></code></p>\n<p>The path set on the session cookie. This should either match the URL path of your\nDjango installation or be parent of that path.</p>\n<p>This is useful if you have multiple Django instances running under the same\nhostname. They can use different cookie paths, and each instance will only see\nits own session cookie.</p>\n</section>\n<section id=\"session-cookie-samesite\">\n<span id=\"std-setting-SESSION_COOKIE_SAMESITE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SAMESITE</span></code><a class=\"heading-anchor\" href=\"#session-cookie-samesite\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'Lax'</span></code></p>\n<p>The value of the <a class=\"reference external\" href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite\">SameSite</a> flag on the session cookie. This flag prevents the\ncookie from being sent in cross-site requests thus preventing CSRF attacks and\nmaking some methods of stealing session cookie impossible.</p>\n<p>Possible values for the setting are:</p>\n<ul>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'Strict'</span></code>: prevents the cookie from being sent by the browser to the\ntarget site in all cross-site browsing context, even when following a regular\nlink.</p>\n<p>For example, for a GitHub-like website this would mean that if a logged-in\nuser follows a link to a private GitHub project posted on a corporate\ndiscussion forum or email, GitHub will not receive the session cookie and the\nuser won't be able to access the project. A bank website, however, most\nlikely doesn't want to allow any transactional pages to be linked from\nexternal sites so the <code class=\"docutils literal notranslate\"><span class=\"pre\">'Strict'</span></code> flag would be appropriate.</p>\n</li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'Lax'</span></code> (default): provides a balance between security and usability for\nwebsites that want to maintain user's logged-in session after the user\narrives from an external link.</p>\n<p>In the GitHub scenario, the session cookie would be allowed when following a\nregular link from an external website and be blocked in CSRF-prone request\nmethods (e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">POST</span></code>).</p>\n</li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'None'</span></code> (string): the session cookie will be sent with all same-site and\ncross-site requests.</p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>: disables the flag.</p></li>\n</ul>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>Modern browsers provide a more secure default policy for the <code class=\"docutils literal notranslate\"><span class=\"pre\">SameSite</span></code>\nflag and will assume <code class=\"docutils literal notranslate\"><span class=\"pre\">Lax</span></code> for cookies without an explicit value set.</p>\n</aside>\n<aside class=\"version-note version-changed\" data-version=\"3.1\">\n<p class=\"version-note-title\">Changed in Django 3.1</p><p>Setting <code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SAMESITE</span> <span class=\"pre\">=</span> <span class=\"pre\">'None'</span></code> was allowed.</p>\n</aside>\n</section>\n<section id=\"session-cookie-secure\">\n<span id=\"std-setting-SESSION_COOKIE_SECURE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SECURE</span></code><a class=\"heading-anchor\" href=\"#session-cookie-secure\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to use a secure cookie for the session cookie. If this is set to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the cookie will be marked as &quot;secure&quot;, which means browsers may\nensure that the cookie is only sent under an HTTPS connection.</p>\n<p>Leaving this setting off isn't a good idea because an attacker could capture an\nunencrypted session cookie with a packet sniffer and use the cookie to hijack\nthe user's session.</p>\n</section>\n<section id=\"session-engine\">\n<span id=\"std-setting-SESSION_ENGINE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_ENGINE</span></code><a class=\"heading-anchor\" href=\"#session-engine\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.backends.db'</span></code></p>\n<p>Controls where Django stores session data. Included engines are:</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.backends.db'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.backends.file'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.backends.cache'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.backends.cached_db'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.backends.signed_cookies'</span></code></p></li>\n</ul>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/topics/http/sessions/#configuring-sessions\"><span class=\"std std-ref\">セッションエンジンを設定する</span></a> for more details.</p>\n</section>\n<section id=\"session-expire-at-browser-close\">\n<span id=\"std-setting-SESSION_EXPIRE_AT_BROWSER_CLOSE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_EXPIRE_AT_BROWSER_CLOSE</span></code><a class=\"heading-anchor\" href=\"#session-expire-at-browser-close\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to expire the session when the user closes their browser. See\n<a class=\"reference internal\" href=\"/ja/3.1/topics/http/sessions/#browser-length-vs-persistent-sessions\"><span class=\"std std-ref\">ブラウザ起動中のみ有効なセッション vs. 永続的なセッション</span></a>.</p>\n</section>\n<section id=\"session-file-path\">\n<span id=\"std-setting-SESSION_FILE_PATH\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_FILE_PATH</span></code><a class=\"heading-anchor\" href=\"#session-file-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>If you're using file-based session storage, this sets the directory in\nwhich Django will store session data. When the default value (<code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>) is\nused, Django will use the standard temporary directory for the system.</p>\n</section>\n<section id=\"session-save-every-request\">\n<span id=\"std-setting-SESSION_SAVE_EVERY_REQUEST\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_SAVE_EVERY_REQUEST</span></code><a class=\"heading-anchor\" href=\"#session-save-every-request\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to save the session data on every request. If this is <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>\n(default), then the session data will only be saved if it has been modified --\nthat is, if any of its dictionary values have been assigned or deleted. Empty\nsessions won't be created, even if this setting is active.</p>\n</section>\n<section id=\"session-serializer\">\n<span id=\"std-setting-SESSION_SERIALIZER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_SERIALIZER</span></code><a class=\"heading-anchor\" href=\"#session-serializer\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.serializers.JSONSerializer'</span></code></p>\n<p>Full import path of a serializer class to use for serializing session data.\nIncluded serializers are:</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.serializers.PickleSerializer'</span></code></p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.sessions.serializers.JSONSerializer'</span></code></p></li>\n</ul>\n<p>See <a class=\"reference internal\" href=\"/ja/3.1/topics/http/sessions/#session-serialization\"><span class=\"std std-ref\">セッションのシリアライズ</span></a> for details, including a warning regarding\npossible remote code execution when using\n<a class=\"reference internal\" href=\"/ja/3.1/topics/http/sessions/#django.contrib.sessions.serializers.PickleSerializer\" title=\"django.contrib.sessions.serializers.PickleSerializer\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">PickleSerializer</span></code></a>.</p>\n</section>\n</section>\n<section id=\"sites\">\n<h2><a class=\"toc-backref\" href=\"#id17\" role=\"doc-backlink\">サイト</a><a class=\"headerlink\" href=\"#sites\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/sites/#module-django.contrib.sites\" title=\"django.contrib.sites: Lets you operate multiple websites from the same database and Django project\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.sites</span></code></a>.</p>\n<section id=\"site-id\">\n<span id=\"std-setting-SITE_ID\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SITE_ID</span></code><a class=\"heading-anchor\" href=\"#site-id\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: 定義されていません</p>\n<p>The ID, as an integer, of the current site in the <code class=\"docutils literal notranslate\"><span class=\"pre\">django_site</span></code> database\ntable. This is used so that application data can hook into specific sites\nand a single database can manage content for multiple sites.</p>\n</section>\n</section>\n<section id=\"static-files\">\n<span id=\"settings-staticfiles\"></span><h2><a class=\"toc-backref\" href=\"#id18\" role=\"doc-backlink\">静的ファイル</a><a class=\"headerlink\" href=\"#static-files\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code></a>.</p>\n<section id=\"static-root\">\n<span id=\"std-setting-STATIC_ROOT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code><a class=\"heading-anchor\" href=\"#static-root\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The absolute path to the directory where <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> will collect\nstatic files for deployment.</p>\n<p>Example: <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;/var/www/example.com/static/&quot;</span></code></p>\n<p>If the <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/\"><span class=\"doc\">staticfiles</span></a> contrib app is enabled\n(as in the default project template), the <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management\ncommand will collect static files into this directory. See the how-to on\n<a class=\"reference internal\" href=\"/ja/3.1/howto/static-files/\"><span class=\"doc\">managing static files</span></a> for more details about\nusage.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">警告</p>\n<p>This should be an initially empty destination directory for collecting\nyour static files from their permanent locations into one directory for\nease of deployment; it is <strong>not</strong> a place to store your static files\npermanently. You should do that in directories that will be found by\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/\"><span class=\"doc\">staticfiles</span></a>’s\n<a class=\"reference internal\" href=\"#std-setting-STATICFILES_FINDERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">finders</span></code></a>, which by default, are\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'static/'</span></code> app sub-directories and any directories you include in\n<a class=\"reference internal\" href=\"#std-setting-STATICFILES_DIRS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_DIRS</span></code></a>).</p>\n</aside>\n</section>\n<section id=\"static-url\">\n<span id=\"std-setting-STATIC_URL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">STATIC_URL</span></code><a class=\"heading-anchor\" href=\"#static-url\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>URL to use when referring to static files located in <a class=\"reference internal\" href=\"#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a>.</p>\n<p>Example: <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;/static/&quot;</span></code> or <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;http://static.example.com/&quot;</span></code></p>\n<p>If not <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, this will be used as the base path for\n<a class=\"reference internal\" href=\"/ja/3.1/topics/forms/media/#form-asset-paths\"><span class=\"std std-ref\">asset definitions</span></a> (the <code class=\"docutils literal notranslate\"><span class=\"pre\">Media</span></code> class) and the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/\"><span class=\"doc\">staticfiles app</span></a>.</p>\n<p>It must end in a slash if set to a non-empty value.</p>\n<p>You may need to <a class=\"reference internal\" href=\"/ja/3.1/howto/static-files/#serving-static-files-in-development\"><span class=\"std std-ref\">configure these files to be served in development</span></a> and will definitely need to do so\n<a class=\"reference internal\" href=\"/ja/3.1/howto/static-files/deployment/\"><span class=\"doc\">in production</span></a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>If <a class=\"reference internal\" href=\"#std-setting-STATIC_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_URL</span></code></a> is a relative path, then it will be prefixed by\nthe server-provided value of <code class=\"docutils literal notranslate\"><span class=\"pre\">SCRIPT_NAME</span></code> (or <code class=\"docutils literal notranslate\"><span class=\"pre\">/</span></code> if not set). This\nmakes it easier to serve a Django application in a subpath without adding\nan extra configuration to the settings.</p>\n</aside>\n</section>\n<section id=\"staticfiles-dirs\">\n<span id=\"std-setting-STATICFILES_DIRS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">STATICFILES_DIRS</span></code><a class=\"heading-anchor\" href=\"#staticfiles-dirs\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (空のリスト)</p>\n<p>この設定は <code class=\"docutils literal notranslate\"><span class=\"pre\">FileSystemFinder</span></code> のファインダーが有効になっている場合に staticfiles アプリが通過する追加の場所を定義します。例えば、 <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> や <a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-findstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">findstatic</span></code></a> 管理コマンドを使用している場合や、 静的ファイル提供ビューを使用している場合などです。</p>\n<p>これは、追加のファイルディレクトリへのフルパスを含む文字列のリストに設定する必要があります。例:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">STATICFILES_DIRS</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"s2\">&quot;/home/special.polls.com/polls/static&quot;</span><span class=\"p\">,</span>\n    <span class=\"s2\">&quot;/home/polls.com/polls/static&quot;</span><span class=\"p\">,</span>\n    <span class=\"s2\">&quot;/opt/webfiles/common&quot;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>これらのパスは、WindowsでもUnixスタイルのスラッシュを使用する必要があることに注意してください（例： `` &quot;C：/ Users / user / mysite / extra_static_content&quot; <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>）。</p>\n<section id=\"prefixes-optional\">\n<span id=\"staticfiles-dirs-prefixes\"></span><h4>プレフィックス(オプション)<a class=\"heading-anchor\" href=\"#prefixes-optional\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>In case you want to refer to files in one of the locations with an additional\nnamespace, you can <strong>optionally</strong> provide a prefix as <code class=\"docutils literal notranslate\"><span class=\"pre\">(prefix,</span> <span class=\"pre\">path)</span></code>\ntuples, e.g.:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">STATICFILES_DIRS</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"c1\"># ...</span>\n    <span class=\"p\">(</span><span class=\"s2\">&quot;downloads&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;/opt/webfiles/stats&quot;</span><span class=\"p\">),</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>For example, assuming you have <a class=\"reference internal\" href=\"#std-setting-STATIC_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_URL</span></code></a> set to <code class=\"docutils literal notranslate\"><span class=\"pre\">'/static/'</span></code>, the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command would collect the &quot;stats&quot; files\nin a <code class=\"docutils literal notranslate\"><span class=\"pre\">'downloads'</span></code> subdirectory of <a class=\"reference internal\" href=\"#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a>.</p>\n<p>This would allow you to refer to the local file\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'/opt/webfiles/stats/polls_20101022.tar.gz'</span></code> with\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'/static/downloads/polls_20101022.tar.gz'</span></code> in your templates, e.g.:</p>\n<div class=\"code-block\" data-language=\"html+django\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Django template</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Django template code\"><code><span class=\"p\">&lt;</span><span class=\"nt\">a</span> <span class=\"na\">href</span><span class=\"o\">=</span><span class=\"s\">&quot;</span><span class=\"cp\">{%</span> <span class=\"k\">static</span> <span class=\"s1\">&#39;downloads/polls_20101022.tar.gz&#39;</span> <span class=\"cp\">%}</span><span class=\"s\">&quot;</span><span class=\"p\">&gt;</span>\n</code></pre></div>\n</section>\n</section>\n<section id=\"staticfiles-storage\">\n<span id=\"std-setting-STATICFILES_STORAGE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">STATICFILES_STORAGE</span></code><a class=\"heading-anchor\" href=\"#staticfiles-storage\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値: <code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.staticfiles.storage.StaticFilesStorage'</span></code></p>\n<p>The file storage engine to use when collecting static files with the\n<a class=\"reference internal\" href=\"/ja/3.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command.</p>\n<p>A ready-to-use instance of the storage backend defined in this setting\ncan be found at <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles.storage.staticfiles_storage</span></code>.</p>\n<p>For an example, see <a class=\"reference internal\" href=\"/ja/3.1/howto/static-files/deployment/#staticfiles-from-cdn\"><span class=\"std std-ref\">クラウドサービスや CDN から静的ファイルを配信する</span></a>.</p>\n</section>\n<section id=\"staticfiles-finders\">\n<span id=\"std-setting-STATICFILES_FINDERS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">STATICFILES_FINDERS</span></code><a class=\"heading-anchor\" href=\"#staticfiles-finders\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>デフォルト値:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[</span>\n    <span class=\"s1\">&#39;django.contrib.staticfiles.finders.FileSystemFinder&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.contrib.staticfiles.finders.AppDirectoriesFinder&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>The list of finder backends that know how to find static files in\nvarious locations.</p>\n<p>The default will find files stored in the <a class=\"reference internal\" href=\"#std-setting-STATICFILES_DIRS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_DIRS</span></code></a> setting\n(using <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles.finders.FileSystemFinder</span></code>) and in a\n<code class=\"docutils literal notranslate\"><span class=\"pre\">static</span></code> subdirectory of each app (using\n<code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles.finders.AppDirectoriesFinder</span></code>). If multiple\nfiles with the same name are present, the first file that is found will be\nused.</p>\n<p>One finder is disabled by default:\n<code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles.finders.DefaultStorageFinder</span></code>. If added to\nyour <a class=\"reference internal\" href=\"#std-setting-STATICFILES_FINDERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_FINDERS</span></code></a> setting, it will look for static files in\nthe default file storage as defined by the <a class=\"reference internal\" href=\"#std-setting-DEFAULT_FILE_STORAGE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_FILE_STORAGE</span></code></a>\nsetting.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>When using the <code class=\"docutils literal notranslate\"><span class=\"pre\">AppDirectoriesFinder</span></code> finder, make sure your apps\ncan be found by staticfiles by adding the app to the\n<a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> setting of your site.</p>\n</aside>\n<p>Static file finders are currently considered a private interface, and this\ninterface is thus undocumented.</p>\n</section>\n</section>\n<section id=\"core-settings-topical-index\">\n<h2><a class=\"toc-backref\" href=\"#id19\" role=\"doc-backlink\">Core Settings Topical Index</a><a class=\"headerlink\" href=\"#core-settings-topical-index\" title=\"Link to this heading\">¶</a></h2>\n<section id=\"cache\">\n<h3>キャッシュ<a class=\"heading-anchor\" href=\"#cache\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-CACHES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CACHES</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CACHE_MIDDLEWARE_ALIAS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CACHE_MIDDLEWARE_ALIAS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CACHE_MIDDLEWARE_KEY_PREFIX\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CACHE_MIDDLEWARE_KEY_PREFIX</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CACHE_MIDDLEWARE_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CACHE_MIDDLEWARE_SECONDS</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"database\">\n<h3>データベース<a class=\"heading-anchor\" href=\"#database\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATABASES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATABASES</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATABASE_ROUTERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATABASE_ROUTERS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_INDEX_TABLESPACE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_INDEX_TABLESPACE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_TABLESPACE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_TABLESPACE</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"debugging\">\n<h3>Debugging<a class=\"heading-anchor\" href=\"#debugging\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEBUG_PROPAGATE_EXCEPTIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG_PROPAGATE_EXCEPTIONS</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"email\">\n<h3>メールアドレス<a class=\"heading-anchor\" href=\"#email\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-ADMINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_CHARSET\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_CHARSET</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_FROM_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_FROM_EMAIL</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_BACKEND\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_BACKEND</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_FILE_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_FILE_PATH</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST_PASSWORD\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_PASSWORD</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST_USER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_USER</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_PORT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_PORT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_SSL_CERTFILE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_SSL_CERTFILE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_SSL_KEYFILE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_SSL_KEYFILE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_SUBJECT_PREFIX\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_SUBJECT_PREFIX</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_TIMEOUT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_TIMEOUT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_LOCALTIME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_LOCALTIME</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_TLS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_TLS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MANAGERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SERVER_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SERVER_EMAIL</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"error-reporting\">\n<h3>エラーのレポート<a class=\"heading-anchor\" href=\"#error-reporting\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_EXCEPTION_REPORTER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_EXCEPTION_REPORTER</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_EXCEPTION_REPORTER_FILTER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_EXCEPTION_REPORTER_FILTER</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-IGNORABLE_404_URLS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">IGNORABLE_404_URLS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MANAGERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SILENCED_SYSTEM_CHECKS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SILENCED_SYSTEM_CHECKS</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"file-uploads\">\n<span id=\"file-upload-settings\"></span><h3>File uploads<a class=\"heading-anchor\" href=\"#file-uploads\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_FILE_STORAGE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_FILE_STORAGE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_HANDLERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_HANDLERS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_MAX_MEMORY_SIZE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_MAX_MEMORY_SIZE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_PERMISSIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_PERMISSIONS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_TEMP_DIR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_TEMP_DIR</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MEDIA_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_ROOT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MEDIA_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_URL</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"forms\">\n<h3>フォーム<a class=\"heading-anchor\" href=\"#forms\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-FORM_RENDERER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FORM_RENDERER</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"globalization-i18n-l10n\">\n<h3>Globalization (<code class=\"docutils literal notranslate\"><span class=\"pre\">i18n</span></code>/<code class=\"docutils literal notranslate\"><span class=\"pre\">l10n</span></code>)<a class=\"heading-anchor\" href=\"#globalization-i18n-l10n\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATE_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATETIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DECIMAL_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DECIMAL_SEPARATOR</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FIRST_DAY_OF_WEEK\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FIRST_DAY_OF_WEEK</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FORMAT_MODULE_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FORMAT_MODULE_PATH</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGE_CODE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_CODE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_AGE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_AGE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_DOMAIN\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_DOMAIN</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_HTTPONLY</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_NAME</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_PATH</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_SAMESITE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_SAMESITE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_SECURE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGES</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LANGUAGES_BIDI\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGES_BIDI</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LOCALE_PATHS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOCALE_PATHS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MONTH_DAY_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MONTH_DAY_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SHORT_DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SHORT_DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATETIME_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TIME_ZONE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-USE_I18N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_I18N</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-USE_THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_THOUSAND_SEPARATOR</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-USE_TZ\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_TZ</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-YEAR_MONTH_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">YEAR_MONTH_FORMAT</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"http\">\n<h3>HTTP<a class=\"heading-anchor\" href=\"#http\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATA_UPLOAD_MAX_MEMORY_SIZE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATA_UPLOAD_MAX_MEMORY_SIZE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATA_UPLOAD_MAX_NUMBER_FIELDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATA_UPLOAD_MAX_NUMBER_FIELDS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_CHARSET\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_CHARSET</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DISALLOWED_USER_AGENTS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DISALLOWED_USER_AGENTS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FORCE_SCRIPT_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FORCE_SCRIPT_NAME</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-INTERNAL_IPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INTERNAL_IPS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE</span></code></a></p></li>\n<li><p>セキュリティ</p>\n<ul>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_BROWSER_XSS_FILTER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_BROWSER_XSS_FILTER</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_CONTENT_TYPE_NOSNIFF\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_CONTENT_TYPE_NOSNIFF</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_INCLUDE_SUBDOMAINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_INCLUDE_SUBDOMAINS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_PRELOAD\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_PRELOAD</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_PROXY_SSL_HEADER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_PROXY_SSL_HEADER</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_REDIRECT_EXEMPT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_REDIRECT_EXEMPT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_REFERRER_POLICY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_REFERRER_POLICY</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_SSL_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_SSL_HOST</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_SSL_REDIRECT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_SSL_REDIRECT</span></code></a></p></li>\n</ul>\n</li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SIGNING_BACKEND\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SIGNING_BACKEND</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-USE_X_FORWARDED_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_HOST</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-USE_X_FORWARDED_PORT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_PORT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-WSGI_APPLICATION\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">WSGI_APPLICATION</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"id11\">\n<h3>ロギング<a class=\"heading-anchor\" href=\"#id11\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-LOGGING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOGGING</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-LOGGING_CONFIG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOGGING_CONFIG</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"models\">\n<h3>モデル<a class=\"heading-anchor\" href=\"#models\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-ABSOLUTE_URL_OVERRIDES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ABSOLUTE_URL_OVERRIDES</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FIXTURE_DIRS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FIXTURE_DIRS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"security\">\n<h3>セキュリティ<a class=\"heading-anchor\" href=\"#security\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>Cross Site Request Forgery Protection</p>\n<ul>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_DOMAIN\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_DOMAIN</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_NAME</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_PATH</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_SAMESITE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SAMESITE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SECURE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_FAILURE_VIEW\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_FAILURE_VIEW</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_HEADER_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_HEADER_NAME</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_TRUSTED_ORIGINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_TRUSTED_ORIGINS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_USE_SESSIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_USE_SESSIONS</span></code></a></p></li>\n</ul>\n</li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECRET_KEY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-X_FRAME_OPTIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">X_FRAME_OPTIONS</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"serialization\">\n<h3>シリアル化<a class=\"heading-anchor\" href=\"#serialization\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_CHARSET\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_CHARSET</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SERIALIZATION_MODULES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SERIALIZATION_MODULES</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"id12\">\n<h3>テンプレート<a class=\"heading-anchor\" href=\"#id12\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TEMPLATES</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"testing\">\n<h3>テスト<a class=\"heading-anchor\" href=\"#testing\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>Database: <a class=\"reference internal\" href=\"#std-setting-DATABASE-TEST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TEST</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TEST_NON_SERIALIZED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TEST_NON_SERIALIZED_APPS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TEST_RUNNER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TEST_RUNNER</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"urls\">\n<h3>URL<a class=\"heading-anchor\" href=\"#urls\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-APPEND_SLASH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">APPEND_SLASH</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-PREPEND_WWW\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">PREPEND_WWW</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-ROOT_URLCONF\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ROOT_URLCONF</span></code></a></p></li>\n</ul>\n</section>\n</section>","rootId":"settings","toc":[{"title":"コアの設定","anchor":"core-settings","children":[{"title":"ABSOLUTE_URL_OVERRIDES","anchor":"absolute-url-overrides","children":[]},{"title":"ADMINS","anchor":"admins","children":[]},{"title":"ALLOWED_HOSTS","anchor":"allowed-hosts","children":[]},{"title":"APPEND_SLASH","anchor":"append-slash","children":[]},{"title":"CACHES","anchor":"caches","children":[{"title":"BACKEND","anchor":"backend","children":[]},{"title":"KEY_FUNCTION","anchor":"key-function","children":[]},{"title":"KEY_PREFIX","anchor":"key-prefix","children":[]},{"title":"LOCATION","anchor":"location","children":[]},{"title":"OPTIONS","anchor":"options","children":[]},{"title":"TIMEOUT","anchor":"timeout","children":[]},{"title":"VERSION","anchor":"version","children":[]}]},{"title":"CACHE_MIDDLEWARE_ALIAS","anchor":"cache-middleware-alias","children":[]},{"title":"CACHE_MIDDLEWARE_KEY_PREFIX","anchor":"cache-middleware-key-prefix","children":[]},{"title":"CACHE_MIDDLEWARE_SECONDS","anchor":"cache-middleware-seconds","children":[]},{"title":"CSRF_COOKIE_AGE","anchor":"csrf-cookie-age","children":[]},{"title":"CSRF_COOKIE_DOMAIN","anchor":"csrf-cookie-domain","children":[]},{"title":"CSRF_COOKIE_HTTPONLY","anchor":"csrf-cookie-httponly","children":[]},{"title":"CSRF_COOKIE_NAME","anchor":"csrf-cookie-name","children":[]},{"title":"CSRF_COOKIE_PATH","anchor":"csrf-cookie-path","children":[]},{"title":"CSRF_COOKIE_SAMESITE","anchor":"csrf-cookie-samesite","children":[]},{"title":"CSRF_COOKIE_SECURE","anchor":"csrf-cookie-secure","children":[]},{"title":"CSRF_USE_SESSIONS","anchor":"csrf-use-sessions","children":[]},{"title":"CSRF_FAILURE_VIEW","anchor":"csrf-failure-view","children":[]},{"title":"CSRF_HEADER_NAME","anchor":"csrf-header-name","children":[]},{"title":"CSRF_TRUSTED_ORIGINS","anchor":"csrf-trusted-origins","children":[]},{"title":"DATABASES","anchor":"databases","children":[{"title":"ATOMIC_REQUESTS","anchor":"atomic-requests","children":[]},{"title":"AUTOCOMMIT","anchor":"autocommit","children":[]},{"title":"ENGINE","anchor":"engine","children":[]},{"title":"HOST","anchor":"host","children":[]},{"title":"NAME","anchor":"name","children":[]},{"title":"CONN_MAX_AGE","anchor":"conn-max-age","children":[]},{"title":"OPTIONS","anchor":"std-setting-OPTIONS","children":[]},{"title":"PASSWORD","anchor":"password","children":[]},{"title":"PORT","anchor":"port","children":[]},{"title":"TIME_ZONE","anchor":"time-zone","children":[]},{"title":"DISABLE_SERVER_SIDE_CURSORS","anchor":"disable-server-side-cursors","children":[]},{"title":"USER","anchor":"user","children":[]},{"title":"TEST","anchor":"test","children":[{"title":"CHARSET","anchor":"charset","children":[]},{"title":"COLLATION","anchor":"collation","children":[]},{"title":"DEPENDENCIES","anchor":"dependencies","children":[]},{"title":"MIGRATE","anchor":"migrate","children":[]},{"title":"MIRROR","anchor":"mirror","children":[]},{"title":"NAME","anchor":"std-setting-TEST_NAME","children":[]},{"title":"SERIALIZE","anchor":"serialize","children":[]},{"title":"TEMPLATE","anchor":"template","children":[]},{"title":"CREATE_DB","anchor":"create-db","children":[]},{"title":"CREATE_USER","anchor":"create-user","children":[]},{"title":"USER","anchor":"std-setting-TEST_USER","children":[]},{"title":"PASSWORD","anchor":"std-setting-TEST_PASSWD","children":[]},{"title":"ORACLE_MANAGED_FILES","anchor":"oracle-managed-files","children":[]},{"title":"TBLSPACE","anchor":"tblspace","children":[]},{"title":"TBLSPACE_TMP","anchor":"tblspace-tmp","children":[]},{"title":"DATAFILE","anchor":"datafile","children":[]},{"title":"DATAFILE_TMP","anchor":"datafile-tmp","children":[]},{"title":"DATAFILE_MAXSIZE","anchor":"datafile-maxsize","children":[]},{"title":"DATAFILE_TMP_MAXSIZE","anchor":"datafile-tmp-maxsize","children":[]},{"title":"DATAFILE_SIZE","anchor":"datafile-size","children":[]},{"title":"DATAFILE_TMP_SIZE","anchor":"datafile-tmp-size","children":[]},{"title":"DATAFILE_EXTSIZE","anchor":"datafile-extsize","children":[]},{"title":"DATAFILE_TMP_EXTSIZE","anchor":"datafile-tmp-extsize","children":[]}]}]},{"title":"DATA_UPLOAD_MAX_MEMORY_SIZE","anchor":"data-upload-max-memory-size","children":[]},{"title":"DATA_UPLOAD_MAX_NUMBER_FIELDS","anchor":"data-upload-max-number-fields","children":[]},{"title":"DATABASE_ROUTERS","anchor":"database-routers","children":[]},{"title":"DATE_FORMAT","anchor":"date-format","children":[]},{"title":"DATE_INPUT_FORMATS","anchor":"date-input-formats","children":[]},{"title":"DATETIME_FORMAT","anchor":"datetime-format","children":[]},{"title":"DATETIME_INPUT_FORMATS","anchor":"datetime-input-formats","children":[]},{"title":"DEBUG","anchor":"debug","children":[]},{"title":"DEBUG_PROPAGATE_EXCEPTIONS","anchor":"debug-propagate-exceptions","children":[]},{"title":"DECIMAL_SEPARATOR","anchor":"decimal-separator","children":[]},{"title":"DEFAULT_CHARSET","anchor":"default-charset","children":[]},{"title":"DEFAULT_EXCEPTION_REPORTER","anchor":"default-exception-reporter","children":[]},{"title":"DEFAULT_EXCEPTION_REPORTER_FILTER","anchor":"default-exception-reporter-filter","children":[]},{"title":"DEFAULT_FILE_STORAGE","anchor":"default-file-storage","children":[]},{"title":"DEFAULT_FROM_EMAIL","anchor":"default-from-email","children":[]},{"title":"DEFAULT_HASHING_ALGORITHM","anchor":"default-hashing-algorithm","children":[]},{"title":"DEFAULT_INDEX_TABLESPACE","anchor":"default-index-tablespace","children":[]},{"title":"DEFAULT_TABLESPACE","anchor":"default-tablespace","children":[]},{"title":"DISALLOWED_USER_AGENTS","anchor":"disallowed-user-agents","children":[]},{"title":"EMAIL_BACKEND","anchor":"email-backend","children":[]},{"title":"EMAIL_FILE_PATH","anchor":"email-file-path","children":[]},{"title":"EMAIL_HOST","anchor":"email-host","children":[]},{"title":"EMAIL_HOST_PASSWORD","anchor":"email-host-password","children":[]},{"title":"EMAIL_HOST_USER","anchor":"email-host-user","children":[]},{"title":"EMAIL_PORT","anchor":"email-port","children":[]},{"title":"EMAIL_SUBJECT_PREFIX","anchor":"email-subject-prefix","children":[]},{"title":"EMAIL_USE_LOCALTIME","anchor":"email-use-localtime","children":[]},{"title":"EMAIL_USE_TLS","anchor":"email-use-tls","children":[]},{"title":"EMAIL_USE_SSL","anchor":"email-use-ssl","children":[]},{"title":"EMAIL_SSL_CERTFILE","anchor":"email-ssl-certfile","children":[]},{"title":"EMAIL_SSL_KEYFILE","anchor":"email-ssl-keyfile","children":[]},{"title":"EMAIL_TIMEOUT","anchor":"email-timeout","children":[]},{"title":"FILE_UPLOAD_HANDLERS","anchor":"file-upload-handlers","children":[]},{"title":"FILE_UPLOAD_MAX_MEMORY_SIZE","anchor":"file-upload-max-memory-size","children":[]},{"title":"FILE_UPLOAD_DIRECTORY_PERMISSIONS","anchor":"file-upload-directory-permissions","children":[]},{"title":"FILE_UPLOAD_PERMISSIONS","anchor":"file-upload-permissions","children":[]},{"title":"FILE_UPLOAD_TEMP_DIR","anchor":"file-upload-temp-dir","children":[]},{"title":"FIRST_DAY_OF_WEEK","anchor":"first-day-of-week","children":[]},{"title":"FIXTURE_DIRS","anchor":"fixture-dirs","children":[]},{"title":"FORCE_SCRIPT_NAME","anchor":"force-script-name","children":[]},{"title":"FORM_RENDERER","anchor":"form-renderer","children":[]},{"title":"FORMAT_MODULE_PATH","anchor":"format-module-path","children":[]},{"title":"IGNORABLE_404_URLS","anchor":"ignorable-404-urls","children":[]},{"title":"INSTALLED_APPS","anchor":"installed-apps","children":[]},{"title":"INTERNAL_IPS","anchor":"internal-ips","children":[]},{"title":"LANGUAGE_CODE","anchor":"language-code","children":[]},{"title":"LANGUAGE_COOKIE_AGE","anchor":"language-cookie-age","children":[]},{"title":"LANGUAGE_COOKIE_DOMAIN","anchor":"language-cookie-domain","children":[]},{"title":"LANGUAGE_COOKIE_HTTPONLY","anchor":"language-cookie-httponly","children":[]},{"title":"LANGUAGE_COOKIE_NAME","anchor":"language-cookie-name","children":[]},{"title":"LANGUAGE_COOKIE_PATH","anchor":"language-cookie-path","children":[]},{"title":"LANGUAGE_COOKIE_SAMESITE","anchor":"language-cookie-samesite","children":[]},{"title":"LANGUAGE_COOKIE_SECURE","anchor":"language-cookie-secure","children":[]},{"title":"LANGUAGES","anchor":"languages","children":[]},{"title":"LANGUAGES_BIDI","anchor":"languages-bidi","children":[]},{"title":"LOCALE_PATHS","anchor":"locale-paths","children":[]},{"title":"LOGGING","anchor":"logging","children":[]},{"title":"LOGGING_CONFIG","anchor":"logging-config","children":[]},{"title":"MANAGERS","anchor":"managers","children":[]},{"title":"MEDIA_ROOT","anchor":"media-root","children":[]},{"title":"MEDIA_URL","anchor":"media-url","children":[]},{"title":"MIDDLEWARE","anchor":"middleware","children":[]},{"title":"MIGRATION_MODULES","anchor":"migration-modules","children":[]},{"title":"MONTH_DAY_FORMAT","anchor":"month-day-format","children":[]},{"title":"NUMBER_GROUPING","anchor":"number-grouping","children":[]},{"title":"PREPEND_WWW","anchor":"prepend-www","children":[]},{"title":"ROOT_URLCONF","anchor":"root-urlconf","children":[]},{"title":"SECRET_KEY","anchor":"secret-key","children":[]},{"title":"SECURE_BROWSER_XSS_FILTER","anchor":"secure-browser-xss-filter","children":[]},{"title":"SECURE_CONTENT_TYPE_NOSNIFF","anchor":"secure-content-type-nosniff","children":[]},{"title":"SECURE_HSTS_INCLUDE_SUBDOMAINS","anchor":"secure-hsts-include-subdomains","children":[]},{"title":"SECURE_HSTS_PRELOAD","anchor":"secure-hsts-preload","children":[]},{"title":"SECURE_HSTS_SECONDS","anchor":"secure-hsts-seconds","children":[]},{"title":"SECURE_PROXY_SSL_HEADER","anchor":"secure-proxy-ssl-header","children":[]},{"title":"SECURE_REDIRECT_EXEMPT","anchor":"secure-redirect-exempt","children":[]},{"title":"SECURE_REFERRER_POLICY","anchor":"secure-referrer-policy","children":[]},{"title":"SECURE_SSL_HOST","anchor":"secure-ssl-host","children":[]},{"title":"SECURE_SSL_REDIRECT","anchor":"secure-ssl-redirect","children":[]},{"title":"SERIALIZATION_MODULES","anchor":"serialization-modules","children":[]},{"title":"SERVER_EMAIL","anchor":"server-email","children":[]},{"title":"SHORT_DATE_FORMAT","anchor":"short-date-format","children":[]},{"title":"SHORT_DATETIME_FORMAT","anchor":"short-datetime-format","children":[]},{"title":"SIGNING_BACKEND","anchor":"signing-backend","children":[]},{"title":"SILENCED_SYSTEM_CHECKS","anchor":"silenced-system-checks","children":[]},{"title":"TEMPLATES","anchor":"templates","children":[{"title":"BACKEND","anchor":"std-setting-TEMPLATES-BACKEND","children":[]},{"title":"NAME","anchor":"std-setting-TEMPLATES-NAME","children":[]},{"title":"DIRS","anchor":"dirs","children":[]},{"title":"APP_DIRS","anchor":"app-dirs","children":[]},{"title":"OPTIONS","anchor":"std-setting-TEMPLATES-OPTIONS","children":[]}]},{"title":"TEST_RUNNER","anchor":"test-runner","children":[]},{"title":"TEST_NON_SERIALIZED_APPS","anchor":"test-non-serialized-apps","children":[]},{"title":"THOUSAND_SEPARATOR","anchor":"thousand-separator","children":[]},{"title":"TIME_FORMAT","anchor":"time-format","children":[]},{"title":"TIME_INPUT_FORMATS","anchor":"time-input-formats","children":[]},{"title":"TIME_ZONE","anchor":"std-setting-TIME_ZONE","children":[]},{"title":"USE_I18N","anchor":"use-i18n","children":[]},{"title":"USE_L10N","anchor":"use-l10n","children":[]},{"title":"USE_THOUSAND_SEPARATOR","anchor":"use-thousand-separator","children":[]},{"title":"USE_TZ","anchor":"use-tz","children":[]},{"title":"USE_X_FORWARDED_HOST","anchor":"use-x-forwarded-host","children":[]},{"title":"USE_X_FORWARDED_PORT","anchor":"use-x-forwarded-port","children":[]},{"title":"WSGI_APPLICATION","anchor":"wsgi-application","children":[]},{"title":"YEAR_MONTH_FORMAT","anchor":"year-month-format","children":[]},{"title":"X_FRAME_OPTIONS","anchor":"x-frame-options","children":[]}]},{"title":"Auth","anchor":"auth","children":[{"title":"AUTHENTICATION_BACKENDS","anchor":"authentication-backends","children":[]},{"title":"AUTH_USER_MODEL","anchor":"auth-user-model","children":[]},{"title":"LOGIN_REDIRECT_URL","anchor":"login-redirect-url","children":[]},{"title":"LOGIN_URL","anchor":"login-url","children":[]},{"title":"LOGOUT_REDIRECT_URL","anchor":"logout-redirect-url","children":[]},{"title":"PASSWORD_RESET_TIMEOUT","anchor":"password-reset-timeout","children":[]},{"title":"PASSWORD_RESET_TIMEOUT_DAYS","anchor":"password-reset-timeout-days","children":[]},{"title":"PASSWORD_HASHERS","anchor":"password-hashers","children":[]},{"title":"AUTH_PASSWORD_VALIDATORS","anchor":"auth-password-validators","children":[]}]},{"title":"メッセージ","anchor":"messages","children":[{"title":"MESSAGE_LEVEL","anchor":"message-level","children":[]},{"title":"MESSAGE_STORAGE","anchor":"message-storage","children":[]},{"title":"MESSAGE_TAGS","anchor":"message-tags","children":[]}]},{"title":"セッション","anchor":"sessions","children":[{"title":"SESSION_CACHE_ALIAS","anchor":"session-cache-alias","children":[]},{"title":"SESSION_COOKIE_AGE","anchor":"session-cookie-age","children":[]},{"title":"SESSION_COOKIE_DOMAIN","anchor":"session-cookie-domain","children":[]},{"title":"SESSION_COOKIE_HTTPONLY","anchor":"session-cookie-httponly","children":[]},{"title":"SESSION_COOKIE_NAME","anchor":"session-cookie-name","children":[]},{"title":"SESSION_COOKIE_PATH","anchor":"session-cookie-path","children":[]},{"title":"SESSION_COOKIE_SAMESITE","anchor":"session-cookie-samesite","children":[]},{"title":"SESSION_COOKIE_SECURE","anchor":"session-cookie-secure","children":[]},{"title":"SESSION_ENGINE","anchor":"session-engine","children":[]},{"title":"SESSION_EXPIRE_AT_BROWSER_CLOSE","anchor":"session-expire-at-browser-close","children":[]},{"title":"SESSION_FILE_PATH","anchor":"session-file-path","children":[]},{"title":"SESSION_SAVE_EVERY_REQUEST","anchor":"session-save-every-request","children":[]},{"title":"SESSION_SERIALIZER","anchor":"session-serializer","children":[]}]},{"title":"サイト","anchor":"sites","children":[{"title":"SITE_ID","anchor":"site-id","children":[]}]},{"title":"静的ファイル","anchor":"static-files","children":[{"title":"STATIC_ROOT","anchor":"static-root","children":[]},{"title":"STATIC_URL","anchor":"static-url","children":[]},{"title":"STATICFILES_DIRS","anchor":"staticfiles-dirs","children":[{"title":"プレフィックス(オプション)","anchor":"prefixes-optional","children":[]}]},{"title":"STATICFILES_STORAGE","anchor":"staticfiles-storage","children":[]},{"title":"STATICFILES_FINDERS","anchor":"staticfiles-finders","children":[]}]},{"title":"Core Settings Topical Index","anchor":"core-settings-topical-index","children":[{"title":"キャッシュ","anchor":"cache","children":[]},{"title":"データベース","anchor":"database","children":[]},{"title":"Debugging","anchor":"debugging","children":[]},{"title":"メールアドレス","anchor":"email","children":[]},{"title":"エラーのレポート","anchor":"error-reporting","children":[]},{"title":"File uploads","anchor":"file-uploads","children":[]},{"title":"フォーム","anchor":"forms","children":[]},{"title":"Globalization (i18n/l10n)","anchor":"globalization-i18n-l10n","children":[]},{"title":"HTTP","anchor":"http","children":[]},{"title":"ロギング","anchor":"id11","children":[]},{"title":"モデル","anchor":"models","children":[]},{"title":"セキュリティ","anchor":"security","children":[]},{"title":"シリアル化","anchor":"serialization","children":[]},{"title":"テンプレート","anchor":"id12","children":[]},{"title":"テスト","anchor":"testing","children":[]},{"title":"URL","anchor":"urls","children":[]}]}],"breadcrumbs":[{"docname":"ref/index","title":"API Reference","url":"/ja/3.1/ref/"}],"prev":{"docname":"ref/schema-editor","title":"SchemaEditor","url":"/ja/3.1/ref/schema-editor/"},"next":{"docname":"ref/signals","title":"Signals","url":"/ja/3.1/ref/signals/"},"formats":{"html":"/ja/3.1/ref/settings/","markdown":"/ja/3.1/ref/settings.md","json":"/ja/3.1/ref/settings.json"},"source":"https://github.com/django/django/blob/stable/3.1.x/docs/ref/settings.txt","official":"https://docs.djangoproject.com/ja/3.1/ref/settings/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}