{"title":"Settings","version":"1.10","locale":"es","docname":"ref/settings","url":"/es/1.10/ref/settings/","canonical":"https://djangodocs.dev/es/1.10/ref/settings/","summary":"Core Settings Auth Messages Sessions Sites Static Files Core Settings Topical Index Advertencia Be careful when you override settings, especially when the default…","html":"<h1>Settings<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=\"contenido\">\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#core-settings\" id=\"id12\">Core Settings</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#auth\" id=\"id13\">Auth</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#messages\" id=\"id14\">Messages</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#sessions\" id=\"id15\">Sessions</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#sites\" id=\"id16\">Sites</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#static-files\" id=\"id17\">Static Files</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#core-settings-topical-index\" id=\"id18\">Core Settings Topical Index</a></p></li>\n</ul>\n</nav>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Advertencia</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-MIDDLEWARE_CLASSES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE_CLASSES</span></code></a>\nand <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>. Make sure you keep the components\nrequired by the features of Django you wish to use.</p>\n</aside>\n<section id=\"core-settings\">\n<h2><a class=\"toc-backref\" href=\"#id12\" role=\"doc-backlink\">Core Settings</a><a class=\"headerlink\" href=\"#core-settings\" title=\"Link to this heading\">¶</a></h2>\n<p>Here’s a list of settings available in Django core and their default values.\nSettings provided by contrib apps are listed below, followed by a topical index\nof the core settings. For introductory material, see the <a class=\"reference internal\" href=\"/es/1.10/topics/settings/\"><span class=\"doc\">settings topic\nguide</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (Empty dictionary)</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>Note that the model name used in this setting should be all lower-case, regardless\nof the case 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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</p>\n<p>A list of all the people who get code error notifications. When\n<code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG=False</span></code> and a view raises an exception, Django will email these people\nwith the full exception information. Each item in the list should be a tuple\nof (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<p>Note that Django will email <em>all</em> of these people whenever an error happens.\nSee <a class=\"reference internal\" href=\"/es/1.10/howto/error-reporting/\"><span class=\"doc\">Error reporting</span></a> for more information.</p>\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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</p>\n<p>A list of strings representing the host/domain names that this Django site can\nserve. This is a security measure to prevent <a class=\"reference internal\" href=\"/es/1.10/topics/security/#host-headers-virtual-hosting\"><span class=\"std std-ref\">HTTP Host header attacks</span></a>, which are possible even under many\nseemingly-safe web server configurations.</p>\n<p>Values in this list can be fully qualified names (e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">'www.example.com'</span></code>),\nin which case they will be matched against the request’s <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> header\nexactly (case-insensitive, not including port). A value beginning with a period\ncan be used as a subdomain wildcard: <code class=\"docutils literal notranslate\"><span class=\"pre\">'.example.com'</span></code> will match\n<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>, and any other subdomain of\n<code class=\"docutils literal notranslate\"><span class=\"pre\">example.com</span></code>. A value of <code class=\"docutils literal notranslate\"><span class=\"pre\">'*'</span></code> will match anything; in this case you are\nresponsible to provide your own validation of the <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> header (perhaps in a\nmiddleware; if so this middleware must be listed first 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>).</p>\n<p>Django also allows the <a class=\"reference external\" href=\"https://en.wikipedia.org/wiki/Fully_qualified_domain_name\">fully qualified domain name (FQDN)</a> of any entries.\nSome browsers include a trailing dot in the <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> header which Django\nstrips when performing host validation.</p>\n<p>If the <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> header (or <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Host</span></code> if\n<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> is enabled) does not match any value in this\nlist, the <a class=\"reference internal\" href=\"/es/1.10/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> method will raise\n<a class=\"reference internal\" href=\"/es/1.10/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>This validation only applies via <a class=\"reference internal\" href=\"/es/1.10/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>;\nif your code accesses the <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> header directly from <code class=\"docutils literal notranslate\"><span class=\"pre\">request.META</span></code> you\nare bypassing this security protection.</p>\n<aside class=\"version-note version-changed\" data-version=\"1.10.3\">\n<p class=\"version-note-title\">Changed in Django 1.10.3</p><p>In older versions, <code class=\"docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code> wasn’t checked if <code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG=True</span></code>.\nThis was also changed in Django 1.9.11 and 1.8.16 to prevent a\nDNS rebinding attack.</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>Default: <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\">True</span></code>, if the request URL does not match any of the patterns\nin the URLconf and it doesn’t end in a slash, an HTTP redirect is issued to the\nsame URL with a slash appended. Note that the redirect may cause any data\nsubmitted in a POST request to be lost.</p>\n<p>The <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> setting is only used if\n<a class=\"reference internal\" href=\"/es/1.10/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> is installed\n(see <a class=\"reference internal\" href=\"/es/1.10/topics/http/middleware/\"><span class=\"doc\">Middleware</span></a>). See also <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>Default:</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</p>\n<p>The cache backend to use. The built-in cache backends are:</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>You can use a cache backend that doesn’t ship with Django by setting\n<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> to a fully-qualified path of a cache\nbackend class (i.e. <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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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 simply an\nidentifying name 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>Default: <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=\"/es/1.10/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>Default: <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>Default: <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=\"/es/1.10/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>Default: <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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</p>\n<p>A string which will be prefixed to the cache keys generated by the <a class=\"reference internal\" href=\"/es/1.10/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=\"/es/1.10/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>Default: <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=\"/es/1.10/topics/cache/#the-per-site-cache\"><span class=\"std std-ref\">cache middleware</span></a>.</p>\n<p>See <a class=\"reference internal\" href=\"/es/1.10/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>Default: <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=\"/es/1.10/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>Default: <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 to be able to access the CSRF cookie.</p>\n<p>This can help prevent malicious JavaScript from bypassing CSRF protection. If\nyou enable this and need to send the value of the CSRF token with Ajax requests,\nyour JavaScript will need to pull the value from a hidden CSRF token form input\non the page instead of from the cookie.</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>Default: <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=\"/es/1.10/ref/csrf/\"><span class=\"doc\">Cross Site Request Forgery protection</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>Default: <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-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>Default: <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 «secure,» which means browsers may ensure that the\ncookie is only sent with an HTTPS connection.</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>Default: <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=\"/es/1.10/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=\"/es/1.10/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<aside class=\"version-note version-changed\" data-version=\"1.10\">\n<p class=\"version-note-title\">Changed in Django 1.10</p><p>The <code class=\"docutils literal notranslate\"><span class=\"pre\">template_name</span></code> parameter and the behavior of searching for a template\ncalled <code class=\"docutils literal notranslate\"><span class=\"pre\">403_csrf.html</span></code> were added to <code class=\"docutils literal notranslate\"><span class=\"pre\">csrf_failure()</span></code>.</p>\n</aside>\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<aside class=\"version-note version-added\" data-version=\"1.9\">\n<p class=\"version-note-title\">New in Django 1.9</p></aside>\n<p>Default: <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<aside class=\"version-note version-added\" data-version=\"1.9\">\n<p class=\"version-note-title\">New in Django 1.9</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (Empty dictionary)</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 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>Default: <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=\"/es/1.10/topics/db/transactions/#tying-transactions-to-http-requests\"><span class=\"std std-ref\">Tying transactions to HTTP requests</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>Default: <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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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<aside class=\"version-note version-changed\" data-version=\"1.9\">\n<p class=\"version-note-title\">Changed in Django 1.9</p><p>The <code class=\"docutils literal notranslate\"><span class=\"pre\">django.db.backends.postgresql</span></code> backend is named\n<code class=\"docutils literal notranslate\"><span class=\"pre\">django.db.backends.postgresql_psycopg2</span></code> in older releases. For backwards\ncompatibility, the old name still works in newer versions.</p>\n</aside>\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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code></p>\n<p>The lifetime of a database connection, in seconds. Use <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code> to close database\nconnections at the end of each request — Django’s historical behavior — and\n<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=\"id1\"></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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (Empty dictionary)</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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<aside class=\"version-note version-added\" data-version=\"1.9\">\n<p class=\"version-note-title\">New in Django 1.9</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>A string representing the time zone for datetimes stored in this database\n(assuming that it doesn’t support time zones) or <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>. The same values are\naccepted as in 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>This allows interacting with third-party databases that store datetimes in\nlocal time rather than UTC. To avoid issues around DST changes, you shouldn’t\nset this option for databases managed by Django.</p>\n<p>Setting this option requires installing <a class=\"reference external\" href=\"http://pytz.sourceforge.net/\">pytz</a>.</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 the database doesn’t support time zones\n(e.g. SQLite, MySQL, Oracle), Django reads and writes datetimes in local time\naccording to this option if it is set and in UTC if it isn’t.</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 the database supports time zones (e.g.\nPostgreSQL), it is an error to set this option.</p>\n<aside class=\"version-note version-changed\" data-version=\"1.9\">\n<p class=\"version-note-title\">Changed in Django 1.9</p><p>Before Django 1.9, the PostgreSQL database backend accepted an\nundocumented <code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code> option, which caused data corruption.</p>\n</aside>\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\">False</span></code>, it is an error to set this option.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (Empty dictionary)</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=\"/es/1.10/topics/testing/overview/#the-test-database\"><span class=\"std std-ref\">The test database</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>Default: <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/static/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-database.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>Default: <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-database.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=\"/es/1.10/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=\"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>Default: <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=\"/es/1.10/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=\"id2\"></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>Default: <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=\"/es/1.10/topics/testing/overview/#the-test-database\"><span class=\"std std-ref\">The test database</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=\"/es/1.10/topics/testing/overview/#test-case-serialized-rollback\"><span class=\"std std-ref\">serialized_rollback=True</span></a>.</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>Default: <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>Default: <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=\"id3\"></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>Default: <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=\"id4\"></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>Default: <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<aside class=\"version-note version-changed\" data-version=\"1.10.3\">\n<p class=\"version-note-title\">Changed in Django 1.10.3</p><p>Older versions used a hardcoded default password. This was also changed\nin 1.9.11 and 1.8.16 to fix possible security implications.</p>\n</aside>\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>Default: <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>Default: <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>Default: <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>Default: <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>Default: <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>Default: <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>\n</section>\n<section id=\"data-upload-max-memory-size\">\n<span id=\"std-setting-DATA_UPLOAD_MAX_MEMORY_SIZE\"></span><h3>DATA_UPLOAD_MAX_MEMORY_SIZE<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<aside class=\"version-note version-added\" data-version=\"1.10\">\n<p class=\"version-note-title\">New in Django 1.10</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">2621440</span></code> (i.e. 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=\"/es/1.10/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>DATA_UPLOAD_MAX_NUMBER_FIELDS<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<aside class=\"version-note version-added\" data-version=\"1.10\">\n<p class=\"version-note-title\">New in Django 1.10</p></aside>\n<p>Default: <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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'N</span> <span class=\"pre\">j,</span> <span class=\"pre\">Y'</span></code> (e.g. <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=\"/es/1.10/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>Default:</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=\"(en Python versión 3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/es/1.10/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>Default: <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> (e.g. <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=\"/es/1.10/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>Default:</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;%Y-%m-</span><span class=\"si\">%d</span><span class=\"s1\">&#39;</span><span class=\"p\">,</span>              <span class=\"c1\"># &#39;2006-10-25&#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&#39;</span><span class=\"p\">,</span>              <span class=\"c1\"># &#39;10/25/2006&#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=\"s1\">&#39;%m/</span><span class=\"si\">%d</span><span class=\"s1\">/%y&#39;</span><span class=\"p\">,</span>              <span class=\"c1\"># &#39;10/25/06&#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=\"(en Python versión 3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/es/1.10/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-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=\"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>Default: <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>Did you catch that? 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>\nturned 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 «Bad Request (400)».</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Nota</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>If set to True, Django’s normal exception handling of view functions\nwill be suppressed, and exceptions will propagate upwards.  This can\nbe useful for some test setups, and should never be used on a live\nsite.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'.'</span></code> (Dot)</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>Default: <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 with <a class=\"reference internal\" href=\"#std-setting-DEFAULT_CONTENT_TYPE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_CONTENT_TYPE</span></code></a> to construct the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">Content-Type</span></code> header.</p>\n</section>\n<section id=\"default-content-type\">\n<span id=\"std-setting-DEFAULT_CONTENT_TYPE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_CONTENT_TYPE</span></code><a class=\"heading-anchor\" href=\"#default-content-type\"><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\">'text/html'</span></code></p>\n<p>Default content type to use for all <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpResponse</span></code> objects, if a MIME type\nisn’t manually specified. Used with <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> to construct\nthe <code class=\"docutils literal notranslate\"><span class=\"pre\">Content-Type</span></code> header.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/es/1.10/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=\"/es/1.10/topics/files/\"><span class=\"doc\">Managing files</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>Default: <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-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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</p>\n<p>List of compiled regular expression objects representing User-Agent strings that\nare not allowed to visit any page, systemwide. Use this for bad robots/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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/es/1.10/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>The backend to use for sending emails. For the list of available backends see\n<a class=\"reference internal\" href=\"/es/1.10/topics/email/\"><span class=\"doc\">Sending email</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>Default: Not defined</p>\n<p>The directory used by the <code class=\"docutils literal notranslate\"><span class=\"pre\">file</span></code> email backend to store output files.</p>\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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'localhost'</span></code></p>\n<p>The host to use for sending email.</p>\n<p>See also <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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</p>\n<p>Password to use for the SMTP server defined in <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>. This\nsetting is used in conjunction with <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> when\nauthenticating to the SMTP server. If either of these settings is empty,\nDjango won’t attempt authentication.</p>\n<p>See also <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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</p>\n<p>Username to use for the SMTP server defined in <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>.\nIf empty, Django won’t attempt authentication.</p>\n<p>See also <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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">25</span></code></p>\n<p>Port to use for the SMTP server defined in <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>\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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'[Django]</span> <span class=\"pre\">'</span></code></p>\n<p>Subject-line prefix for email messages sent with <code class=\"docutils literal notranslate\"><span class=\"pre\">django.core.mail.mail_admins</span></code>\nor <code class=\"docutils literal notranslate\"><span class=\"pre\">django.core.mail.mail_managers</span></code>. You’ll probably want to include the\ntrailing space.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to use a TLS (secure) connection when talking to the SMTP server.\nThis is used for explicit TLS connections, generally on port 587. If you are\nexperiencing hanging connections, see the implicit TLS setting\n<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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to use an implicit TLS (secure) connection when talking to the SMTP\nserver. In most email documentation this type of TLS connection is referred\nto as SSL. It is generally used on port 465. If you are experiencing problems,\nsee the explicit TLS setting <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>Note that <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> are mutually\nexclusive, so only set one of those settings to <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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>If <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> or <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> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, you can\noptionally specify the path to a PEM-formatted certificate chain file to use\nfor the SSL connection.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>If <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> or <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> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, you can\noptionally specify the path to a PEM-formatted private key file to use for the\nSSL connection.</p>\n<p>Note that setting <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> and <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>\ndoesn’t result in any certificate checking. They’re passed to the underlying SSL\nconnection. Please refer to the documentation of Python’s\n<code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">python:ssl.wrap_socket()</span></code> function for details on how the certificate chain\nfile and private key file are handled.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>Specifies a timeout in seconds for blocking operations like the connection\nattempt.</p>\n</section>\n<section id=\"file-charset\">\n<span id=\"std-setting-FILE_CHARSET\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FILE_CHARSET</span></code><a class=\"heading-anchor\" href=\"#file-charset\"><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\">'utf-8'</span></code></p>\n<p>The character encoding used to decode any files read from disk. This includes\ntemplate files and initial SQL data files.</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>Default:</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=\"/es/1.10/topics/files/\"><span class=\"doc\">Managing files</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">2621440</span></code> (i.e. 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=\"/es/1.10/topics/files/\"><span class=\"doc\">Managing files</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>Default: <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=\"/es/1.10/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=\"/es/1.10/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\">None</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=\"(en Python versión 3.14)\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">os.chmod()</span></code></a>.</p>\n<p>If this isn’t given or is <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, you’ll get operating-system\ndependent behavior. On most platforms, temporary files will have a mode\nof <code class=\"docutils literal notranslate\"><span class=\"pre\">0o600</span></code>, and files saved from memory will be saved using the\nsystem’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=\"/es/1.10/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=\"/es/1.10/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\">Advertencia</p>\n<p><strong>Always prefix the mode with a 0.</strong></p>\n<p>If you’re not familiar with file modes, please note that the leading\n<code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code> is very important: it indicates an octal number, which is the\nway that modes must be specified. If you try to use <code class=\"docutils literal notranslate\"><span class=\"pre\">644</span></code>, you’ll\nget totally incorrect behavior.</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>Default: <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=\"/es/1.10/topics/files/\"><span class=\"doc\">Managing files</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code> (Sunday)</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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=\"/es/1.10/howto/initial-data/#initial-data-via-fixtures\"><span class=\"std std-ref\">Providing initial data with fixtures</span></a> and <a class=\"reference internal\" href=\"/es/1.10/topics/testing/tools/#topics-testing-fixtures\"><span class=\"std std-ref\">Fixture loading</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>Default: <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=\"/es/1.10/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<aside class=\"version-note version-changed\" data-version=\"1.10\">\n<p class=\"version-note-title\">Changed in Django 1.10</p><p>The setting’s use in <a class=\"reference internal\" href=\"/es/1.10/ref/applications/#django.setup\" title=\"django.setup\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">django.setup()</span></code></a> was added.</p>\n</aside>\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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>A full Python path to a Python package that contains format definitions for\nproject 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 <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>,\n<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-YEAR_MONTH_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">YEAR_MONTH_FORMAT</span></code></a>,\n<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>, <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>,\n<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>, <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>,\n<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> 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>.</p>\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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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=\"/es/1.10/howto/error-reporting/\"><span class=\"doc\">Error reporting</span></a>). Regular expressions are matched against\n<a class=\"reference internal\" href=\"/es/1.10/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>, or if it gets\nhammered by script kiddies.</p>\n<p>This is only used if\n<a class=\"reference internal\" href=\"/es/1.10/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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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=\"/es/1.10/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=\"/es/1.10/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 «internal» (as opposed to «EXTERNAL») in\n<a class=\"reference internal\" href=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'en-us'</span></code></p>\n<p>A string representing the language code for this installation. This should be in\nstandard <a class=\"reference internal\" href=\"/es/1.10/topics/i18n/#term-language-code\"><span class=\"xref std std-term\">language ID format</span></a>. For example, U.S. English\nis <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;en-us&quot;</span></code>. See also the <a class=\"reference external\" href=\"http://www.i18nguy.com/unicode/language-identifiers.html\">list of language identifiers</a> and\n<a class=\"reference internal\" href=\"/es/1.10/topics/i18n/\"><span class=\"doc\">Internationalization and localization</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> must be active for this setting to have any effect.</p>\n<p>It serves two purposes:</p>\n<ul class=\"simple\">\n<li><p>If the locale middleware isn’t in use, it decides which translation is served\nto all users.</p></li>\n<li><p>If the locale middleware is active, it provides a fallback language in case the\nuser’s preferred language can’t be determined or is not supported by the\nwebsite. It also provides the fallback translation when a translation for a\ngiven literal doesn’t exist for the user’s preferred language.</p></li>\n</ul>\n<p>See <a class=\"reference internal\" href=\"/es/1.10/topics/i18n/translation/#how-django-discovers-language-preference\"><span class=\"std std-ref\">How Django discovers language preference</span></a> for more details.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> (expires at browser close)</p>\n<p>The age of the language cookie, in seconds.</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>Default: <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> (note the leading dot!) for cross-domain cookies, or use\n<code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for a standard domain 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-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>Default: <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=\"/es/1.10/topics/i18n/\"><span class=\"doc\">Internationalization and localization</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>Default: <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=\"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<code class=\"docutils literal notranslate\"><span class=\"pre\">django/conf/global_settings.py</span></code> (or view the <a class=\"reference external\" href=\"https://github.com/django/django/blob/master/django/conf/global_settings.py\">online source</a>).</p>\n<p>The list is a list of two-tuples in the format\n(<a class=\"reference internal\" href=\"/es/1.10/topics/i18n/#term-language-code\"><span class=\"xref std std-term\">language code</span></a>, <code class=\"docutils literal notranslate\"><span class=\"pre\">language</span> <span class=\"pre\">name</span></code>) – for example,\n<code class=\"docutils literal notranslate\"><span class=\"pre\">('ja',</span> <span class=\"pre\">'Japanese')</span></code>.\nThis specifies which languages are available for language selection. See\n<a class=\"reference internal\" href=\"/es/1.10/topics/i18n/\"><span class=\"doc\">Internationalization and localization</span></a>.</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.</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=\"/es/1.10/ref/utils/#django.utils.translation.ugettext_lazy\" title=\"django.utils.translation.ugettext_lazy\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">ugettext_lazy()</span></code></a> function.</p>\n<p>Here’s a sample settings file:</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\">ugettext_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=\"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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</p>\n<p>A list of directories where Django looks for translation files.\nSee <a class=\"reference internal\" href=\"/es/1.10/topics/i18n/translation/#how-django-discovers-translations\"><span class=\"std std-ref\">How Django discovers translations</span></a>.</p>\n<p>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\">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 will look within each of these paths for the <code class=\"docutils literal notranslate\"><span class=\"pre\">&lt;locale_code&gt;/LC_MESSAGES</span></code>\ndirectories containing the actual translation files.</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>Default: A logging configuration dictionary.</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=\"/es/1.10/topics/logging/#configuring-logging\"><span class=\"std std-ref\">Configuring logging</span></a>.</p>\n<p>You can see the default logging configuration by looking in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">django/utils/log.py</span></code> (or view the <a class=\"reference external\" href=\"https://github.com/django/django/blob/master/django/utils/log.py\">online source</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>Default: <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 a instance of Python’s <a class=\"reference external\" href=\"https://docs.python.org/3/library/logging.config.html#logging-config-dictschema\" title=\"(en Python versión 3.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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</p>\n<p>Absolute filesystem path to the directory that will hold <a class=\"reference internal\" href=\"/es/1.10/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\">Advertencia</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</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=\"/es/1.10/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=\"/es/1.10/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\">Advertencia</p>\n<p>There are security risks if you are accepting uploaded content from\nuntrusted users! See the security guide’s topic on\n<a class=\"reference internal\" href=\"/es/1.10/topics/security/#user-uploaded-content-security\"><span class=\"std std-ref\">User-uploaded content</span></a> for mitigation details.</p>\n</aside>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Advertencia</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</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<aside class=\"version-note version-added\" data-version=\"1.10\">\n<p class=\"version-note-title\">New in Django 1.10</p></aside>\n<p>Default:: <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=\"/es/1.10/topics/http/middleware/\"><span class=\"doc\">Middleware</span></a>.</p>\n</section>\n<section id=\"middleware-classes\">\n<span id=\"std-setting-MIDDLEWARE_CLASSES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE_CLASSES</span></code><a class=\"heading-anchor\" href=\"#middleware-classes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-deprecated\" data-version=\"1.10\">\n<p class=\"version-note-title\">Deprecated since Django 1.10</p><p><span class=\"versionmodified deprecated\">Obsoleto desde la versión 1.10: </span>Old-style middleware that uses  <code class=\"docutils literal notranslate\"><span class=\"pre\">settings.MIDDLEWARE_CLASSES</span></code> are\ndeprecated. <a class=\"reference internal\" href=\"/es/1.10/topics/http/middleware/#upgrading-middleware\"><span class=\"std std-ref\">Adapt old, custom middleware</span></a> and\nuse the <a class=\"reference internal\" href=\"#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE</span></code></a> setting.</p>\n</aside>\n<p>Default:</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.middleware.common.CommonMiddleware&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.middleware.csrf.CsrfViewMiddleware&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>A list of middleware classes to use. This was the default setting used in\nDjango 1.9 and earlier. Django 1.10 introduced a new style of middleware. If\nyou have an older project using this setting you should <a class=\"reference internal\" href=\"/es/1.10/topics/http/middleware/#upgrading-middleware\"><span class=\"std std-ref\">update any\nmiddleware you’ve written yourself</span></a> to the new style\nand then use the <a class=\"reference internal\" href=\"#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE</span></code></a> setting.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (Empty dictionary)</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>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;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=\"/es/1.10/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<aside class=\"version-note version-added\" data-version=\"1.9\">\n<p class=\"version-note-title\">New in Django 1.9</p></aside>\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). If this is used in\nyour general project settings, remember to use the <a class=\"reference internal\" href=\"/es/1.10/ref/django-admin/#cmdoption-migrate-run-syncdb\"><code class=\"xref std std-option docutils literal notranslate\"><span class=\"pre\">migrate</span>\n<span class=\"pre\">--run-syncdb</span></code></a> option if you want to create tables for the app.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'F</span> <span class=\"pre\">j'</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\nmonth and day 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 day displays the day and month. Different\nlocales have different formats. For example, U.S. English would say\n«January 1,» whereas Spanish might say «1 Enero.»</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 corresponding\nlocale-dictated format has higher precedence and will be applied.</p>\n<p>See <a class=\"reference internal\" href=\"/es/1.10/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>,\n<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-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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code></p>\n<p>Number of digits grouped together on the integer part of a number.</p>\n<p>Common use is to display a thousand separator. If this setting is <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code>, then\nno grouping will be applied to the number. If this setting is greater than\n<code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code>, then <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> will be used as the separator between\nthose groups.</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-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> 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=\"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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code></p>\n<p>Whether to prepend the «www.» subdomain to URLs that don’t have it. This is only\nused if <a class=\"reference internal\" href=\"/es/1.10/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> is installed\n(see <a class=\"reference internal\" href=\"/es/1.10/topics/http/middleware/\"><span class=\"doc\">Middleware</span></a>). See also <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>Default: Not defined</p>\n<p>A string representing the full Python import path to your root URLconf. For example:\n<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=\"/es/1.10/topics/http/urls/#how-django-processes-a-request\"><span class=\"std std-ref\">How Django processes a request</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">''</span></code> (Empty string)</p>\n<p>A secret key for a particular Django installation. This is used to provide\n<a class=\"reference internal\" href=\"/es/1.10/topics/signing/\"><span class=\"doc\">cryptographic signing</span></a>, and should be set to a unique,\nunpredictable value.</p>\n<p><a class=\"reference internal\" href=\"/es/1.10/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> automatically adds a\nrandomly-generated <code class=\"docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code> to each new project.</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=\"/es/1.10/ref/utils/#django.utils.encoding.force_text\" title=\"django.utils.encoding.force_text\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">force_text()</span></code></a> or\n<a class=\"reference internal\" href=\"/es/1.10/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>Django will refuse to start if <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> is not set.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Advertencia</p>\n<p><strong>Keep this value secret.</strong></p>\n<p>Running Django with a known <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> defeats many of Django’s\nsecurity protections, and can lead to privilege escalation and remote code\nexecution vulnerabilities.</p>\n</aside>\n<p>The secret key is used for:</p>\n<ul class=\"simple\">\n<li><p>All <a class=\"reference internal\" href=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/ref/contrib/messages/\"><span class=\"doc\">messages</span></a> if you are using\n<a class=\"reference internal\" href=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/topics/auth/default/#django.contrib.auth.views.password_reset\" title=\"django.contrib.auth.views.password_reset\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">password_reset()</span></code></a> tokens.</p></li>\n<li><p>Any usage of <a class=\"reference internal\" href=\"/es/1.10/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\">Nota</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=\"/es/1.10/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>Default: <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=\"/es/1.10/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=\"/es/1.10/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</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>Default: <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=\"/es/1.10/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=\"/es/1.10/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</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>Default: <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=\"/es/1.10/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=\"/es/1.10/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\">Advertencia</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=\"/es/1.10/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-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>Default: <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=\"/es/1.10/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=\"/es/1.10/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\">Advertencia</p>\n<p>Setting this incorrectly can irreversibly (for some time) break your site.\nRead the <a class=\"reference internal\" href=\"/es/1.10/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>Default: <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>This takes some explanation. By default, <code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code> is able to determine\nwhether a request is secure by looking at whether the requested URL uses\n«<a class=\"reference external\" href=\"https://\">https://</a>». This is important for Django’s CSRF protection, and may be used\nby your own code or third-party apps.</p>\n<p>If your Django app is behind a proxy, though, the proxy may be «swallowing» the\nfact that a request is HTTPS, using a non-HTTPS connection between the proxy\nand Django. In this case, <code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code> would always return <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> – even\nfor requests that were made via HTTPS by the end user.</p>\n<p>In this situation, you’ll want to configure your proxy to set a custom HTTP\nheader that tells Django whether the request came in via HTTPS, and you’ll want\nto set <code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_PROXY_SSL_HEADER</span></code> so that Django knows what header to look\nfor.</p>\n<p>You’ll need to set a tuple with two elements – the name of the header to look\nfor and the required 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>Here, we’re telling Django that we trust the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Proto</span></code> header\nthat comes from our proxy, and any time its value is <code class=\"docutils literal notranslate\"><span class=\"pre\">'https'</span></code>, then the\nrequest is guaranteed to be secure (i.e., it originally came in via HTTPS).\nObviously, you should <em>only</em> set this setting if you control your proxy or\nhave some other guarantee 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\">Advertencia</p>\n<p><strong>You will probably open security holes in your site if you set this\nwithout knowing what you’re doing. And if you fail to set it when you\nshould. Seriously.</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</p>\n<p>If a URL path matches a regular expression in this list, the request will not be\nredirected to HTTPS. 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-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>Default: <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>Default: <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=\"/es/1.10/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=\"/es/1.10/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\">Nota</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>Default: Not defined</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>Default: <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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'m/d/Y'</span></code> (e.g. <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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'m/d/Y</span> <span class=\"pre\">P'</span></code> (e.g. <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=\"/es/1.10/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>Default: <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=\"/es/1.10/topics/signing/\"><span class=\"doc\">Cryptographic signing</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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<aside class=\"version-note version-changed\" data-version=\"1.9\">\n<p class=\"version-note-title\">Changed in Django 1.9</p><p>In older versions, silenced messages of <code class=\"docutils literal notranslate\"><span class=\"pre\">ERROR</span></code> level or higher were\nprinted to the console.</p>\n</aside>\n<p>See also the <a class=\"reference internal\" href=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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 simple setup that tells the Django template engine to load templates\nfrom the <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=\"id6\"></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>Default: Not defined</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=\"id7\"></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>Default: see below</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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>Default: <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\">Nota</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=\"/es/1.10/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=\"id8\"></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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">{}</span></code> (Empty dict)</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=\"/es/1.10/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=\"/es/1.10/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>Default: <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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">','</span></code> (Comma)</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'P'</span></code> (e.g. <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=\"/es/1.10/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>Default:</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=\"(en Python versión 3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/es/1.10/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=\"id9\"></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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'America/Chicago'</span></code></p>\n<p>A string representing the time zone for this installation, or <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>. See\nthe <a class=\"reference external\" href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">list of time zones</a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Nota</p>\n<p>Since Django was first released with the <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> set to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'America/Chicago'</span></code>, the global setting (used if nothing is defined in\nyour project’s <code class=\"docutils literal notranslate\"><span class=\"pre\">settings.py</span></code>) remains <code class=\"docutils literal notranslate\"><span class=\"pre\">'America/Chicago'</span></code> for backwards\ncompatibility. New project templates default to <code class=\"docutils literal notranslate\"><span class=\"pre\">'UTC'</span></code>.</p>\n</aside>\n<p>Note that this isn’t necessarily the time zone of the server. For example, one\nserver may serve multiple Django-powered sites, each with a separate time zone\nsetting.</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\">False</span></code>, this is the time zone in which Django\nwill store all datetimes. 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>, this is the\ndefault time zone that Django will use to display datetimes in templates and\nto interpret datetimes entered in forms.</p>\n<p>Django sets the <code class=\"docutils literal notranslate\"><span class=\"pre\">os.environ['TZ']</span></code> variable to the time zone you specify in\nthe <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 under the following conditions:</p>\n<ul class=\"simple\">\n<li><p>If you’re using the manual configuration option as described in\n<a class=\"reference internal\" href=\"/es/1.10/topics/settings/#settings-without-django-settings-module\"><span class=\"std std-ref\">manually configuring settings</span></a>, or</p></li>\n<li><p>If you specify <code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span> <span class=\"pre\">=</span> <span class=\"pre\">None</span></code>. This will cause Django to fall back to\nusing the system timezone. However, this is discouraged 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>\n<span class=\"pre\">=</span> <span class=\"pre\">True</span></code></a>, because it makes conversions between local time and UTC\nless reliable.</p></li>\n</ul>\n<p>If Django doesn’t set the <code class=\"docutils literal notranslate\"><span class=\"pre\">TZ</span></code> environment variable, it’s up to you\nto ensure your processes are running in the correct environment.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Nota</p>\n<p>Django cannot reliably use alternate time zones in a Windows environment.\nIf you’re running Django on 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> must be set to\nmatch the system time zone.</p>\n</aside>\n</section>\n<section id=\"use-etags\">\n<span id=\"std-setting-USE_ETAGS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_ETAGS</span></code><a class=\"heading-anchor\" href=\"#use-etags\"><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\">False</span></code></p>\n<p>A boolean that specifies whether to output the <code class=\"docutils literal notranslate\"><span class=\"pre\">ETag</span></code> header. This saves\nbandwidth but slows down performance. This is used by the\n<a class=\"reference internal\" href=\"/es/1.10/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> and in the <a class=\"reference internal\" href=\"/es/1.10/topics/cache/\"><span class=\"doc\">cache\nframework</span></a>.</p>\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>Default: <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 an easy 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\">Nota</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=\"/es/1.10/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>Default: <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\">Nota</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=\"/es/1.10/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>Default: <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 <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> and if this is also set to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, Django will use the values of <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-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a> to format numbers unless the locale already has an\nexisting thousands separator. If there is a thousands separator in the locale\nformat, it will have higher precedence and will be applied instead.</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>Default: <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.\nOtherwise, Django will use naive datetimes in local time.</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\">Nota</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=\"/es/1.10/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>Default: <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#page-7\"><strong>RFC 7239 Page 7</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<aside class=\"version-note version-added\" data-version=\"1.9\">\n<p class=\"version-note-title\">New in Django 1.9</p></aside>\n<p>Default: <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>Default: <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=\"/es/1.10/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=\"/es/1.10/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 simple\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=\"/es/1.10/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>Default: <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«January 2006,» whereas another locale might say «2006/January.»</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 corresponding\nlocale-dictated format has higher precedence and will be applied.</p>\n<p>See <a class=\"reference internal\" href=\"/es/1.10/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\">'SAMEORIGIN'</span></code></p>\n<p>The default value for the X-Frame-Options header used by\n<a class=\"reference internal\" href=\"/es/1.10/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=\"/es/1.10/ref/clickjacking/\"><span class=\"doc\">clickjacking protection</span></a> documentation.</p>\n</section>\n</section>\n<section id=\"auth\">\n<h2><a class=\"toc-backref\" href=\"#id13\" 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=\"/es/1.10/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>Default: <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=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'auth.User'</span></code></p>\n<p>The model to use to represent a User. See <a class=\"reference internal\" href=\"/es/1.10/topics/auth/customizing/#auth-custom-user\"><span class=\"std std-ref\">Substituting a custom User model</span></a>.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Advertencia</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=\"/es/1.10/topics/auth/customizing/#auth-custom-user\"><span class=\"std std-ref\">Substituting a custom User model</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'/accounts/profile/'</span></code></p>\n<p>The URL where requests are redirected after login when the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">contrib.auth.login</span></code> view gets no <code class=\"docutils literal notranslate\"><span class=\"pre\">next</span></code> parameter.</p>\n<p>This is used by the <a class=\"reference internal\" href=\"/es/1.10/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>\ndecorator, for example.</p>\n<p>This setting also accepts <a class=\"reference internal\" href=\"/es/1.10/topics/http/urls/#naming-url-patterns\"><span class=\"std std-ref\">named URL patterns</span></a> which\ncan be used to reduce configuration duplication since you don’t have to define\nthe URL in two places (<code class=\"docutils literal notranslate\"><span class=\"pre\">settings</span></code> and URLconf).</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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'/accounts/login/'</span></code></p>\n<p>The URL where requests are redirected for login, especially when using the\n<a class=\"reference internal\" href=\"/es/1.10/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.</p>\n<p>This setting also accepts <a class=\"reference internal\" href=\"/es/1.10/topics/http/urls/#naming-url-patterns\"><span class=\"std std-ref\">named URL patterns</span></a> which\ncan be used to reduce configuration duplication since you don’t have to define\nthe URL in two places (<code class=\"docutils literal notranslate\"><span class=\"pre\">settings</span></code> and URLconf).</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<aside class=\"version-note version-added\" data-version=\"1.10\">\n<p class=\"version-note-title\">New in Django 1.10</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code></p>\n<p>The URL where requests are redirected after a user logs out using the\n<a class=\"reference internal\" href=\"/es/1.10/topics/auth/default/#django.contrib.auth.views.logout\" title=\"django.contrib.auth.views.logout\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">logout()</span></code></a> view (if the view doesn’t get a\n<code class=\"docutils literal notranslate\"><span class=\"pre\">next_page</span></code> argument).</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<p>This setting also accepts <a class=\"reference internal\" href=\"/es/1.10/topics/http/urls/#naming-url-patterns\"><span class=\"std std-ref\">named URL patterns</span></a> which\ncan be used to reduce configuration duplication since you don’t have to define\nthe URL in two places (<code class=\"docutils literal notranslate\"><span class=\"pre\">settings</span></code> and URLconf).</p>\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>Default: <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. Used by the\n<a class=\"reference internal\" href=\"/es/1.10/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> password reset mechanism.</p>\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=\"/es/1.10/topics/auth/passwords/#auth-password-storage\"><span class=\"std std-ref\">How Django stores passwords</span></a>.</p>\n<p>Default:</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=\"s1\">&#39;django.contrib.auth.hashers.BCryptPasswordHasher&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<aside class=\"version-note version-changed\" data-version=\"1.10\">\n<p class=\"version-note-title\">Changed in Django 1.10</p><p>The following hashers were removed from the defaults:</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=\"s1\">&#39;django.contrib.auth.hashers.SHA1PasswordHasher&#39;</span>\n<span class=\"s1\">&#39;django.contrib.auth.hashers.MD5PasswordHasher&#39;</span>\n<span class=\"s1\">&#39;django.contrib.auth.hashers.UnsaltedSHA1PasswordHasher&#39;</span>\n<span class=\"s1\">&#39;django.contrib.auth.hashers.UnsaltedMD5PasswordHasher&#39;</span>\n<span class=\"s1\">&#39;django.contrib.auth.hashers.CryptPasswordHasher&#39;</span>\n</code></pre></div>\n<p>Consider using a <a class=\"reference internal\" href=\"/es/1.10/topics/auth/passwords/#wrapping-password-hashers\"><span class=\"std std-ref\">wrapped password hasher</span></a>\nto strengthen the hashes in your database. If that’s not feasible, add this\nsetting to your project and add back any hashers that you need.</p>\n<p>Also, the <code class=\"docutils literal notranslate\"><span class=\"pre\">Argon2PasswordHasher</span></code> was added.</p>\n</aside>\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<aside class=\"version-note version-added\" data-version=\"1.9\">\n<p class=\"version-note-title\">New in Django 1.9</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</p>\n<p>The list of validators that are used to check the strength of user’s passwords.\nSee <a class=\"reference internal\" href=\"/es/1.10/topics/auth/passwords/#password-validation\"><span class=\"std std-ref\">Password validation</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=\"#id14\" role=\"doc-backlink\">Messages</a><a class=\"headerlink\" href=\"#messages\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/es/1.10/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>Default: <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=\"/es/1.10/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=\"/es/1.10/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>Default: <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=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/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>Default:</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=\"/es/1.10/ref/contrib/messages/#message-displaying\"><span class=\"std std-ref\">Displaying messages</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=\"/es/1.10/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=\"#id15\" role=\"doc-backlink\">Sessions</a><a class=\"headerlink\" href=\"#sessions\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'default'</span></code></p>\n<p>If you’re using <a class=\"reference internal\" href=\"/es/1.10/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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">1209600</span></code> (2 weeks, in seconds)</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>Default: <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> (note the leading dot!) for cross-domain cookies, or use\n<code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for a standard domain 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 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=\"/es/1.10/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>Default: <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 to be able to access the\nsession cookie.</p>\n<p><a class=\"reference external\" href=\"https://www.owasp.org/index.php/HTTPOnly\">HTTPOnly</a> is a flag included in a Set-Cookie HTTP response header. It\nis not part of the <span class=\"target\" id=\"index-1\"></span><a class=\"rfc reference external\" href=\"https://datatracker.ietf.org/doc/html/rfc2109.html\"><strong>RFC 2109</strong></a> standard for cookies, and it isn’t honored\nconsistently by all browsers. However, when it is honored, it can be a\nuseful way to mitigate the risk of a client side script accessing the\nprotected cookie data.</p>\n<p>Turning it on makes it less trivial for an attacker to escalate a cross-site\nscripting vulnerability into full hijacking of a user’s session. There’s not\nmuch excuse for leaving this off, either: if your code depends on reading\nsession cookies from JavaScript, you’re probably doing it wrong.</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>Default: <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>Default: <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-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>Default: <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 «secure,» which means browsers may\nensure that the cookie is only sent under an HTTPS connection.</p>\n<p>Since it’s trivial for a packet sniffer (e.g. <a class=\"reference external\" href=\"http://codebutler.com/firesheep\">Firesheep</a>) to hijack a user’s\nsession if the session cookie is sent unencrypted, there’s really no good\nexcuse to leave this off. It will prevent you from using sessions on insecure\nrequests and that’s a good thing.</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>Default: <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=\"/es/1.10/topics/http/sessions/#configuring-sessions\"><span class=\"std std-ref\">Configuring the session engine</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>Default: <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=\"/es/1.10/topics/http/sessions/#browser-length-vs-persistent-sessions\"><span class=\"std std-ref\">Browser-length sessions vs. persistent sessions</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>Default: <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>Default: <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>Default: <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=\"/es/1.10/topics/http/sessions/#session-serialization\"><span class=\"std std-ref\">Session serialization</span></a> for details, including a warning regarding\npossible remote code execution when using\n<a class=\"reference internal\" href=\"/es/1.10/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=\"#id16\" role=\"doc-backlink\">Sites</a><a class=\"headerlink\" href=\"#sites\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/es/1.10/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>Default: Not defined</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=\"#id17\" role=\"doc-backlink\">Static Files</a><a class=\"headerlink\" href=\"#static-files\" title=\"Link to this heading\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/es/1.10/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>Default: <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=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/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\">Advertencia</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=\"/es/1.10/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>Default: <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=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/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=\"/es/1.10/howto/static-files/deployment/\"><span class=\"doc\">in production</span></a>.</p>\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>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">[]</span></code> (Empty list)</p>\n<p>This setting defines the additional locations the staticfiles app will traverse\nif the <code class=\"docutils literal notranslate\"><span class=\"pre\">FileSystemFinder</span></code> finder is enabled, e.g. if you use the\n<a class=\"reference internal\" href=\"/es/1.10/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> or <a class=\"reference internal\" href=\"/es/1.10/ref/contrib/staticfiles/#django-admin-findstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">findstatic</span></code></a> management command or use the\nstatic file serving view.</p>\n<p>This should be set to a list of strings that contain full paths to\nyour additional files directory(ies) 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=\"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>Note that these paths should use Unix-style forward slashes, even on Windows\n(e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;C:/Users/user/mysite/extra_static_content&quot;</span></code>).</p>\n<section id=\"prefixes-optional\">\n<h4>Prefixes (optional)<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=\"/es/1.10/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 «stats» 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=\"s2\">&quot;downloads/polls_20101022.tar.gz&quot;</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>Default: <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=\"/es/1.10/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=\"/es/1.10/howto/static-files/deployment/#staticfiles-from-cdn\"><span class=\"std std-ref\">Serving static files from a cloud service or 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>Default:</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\">Nota</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. Simply add 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=\"#id18\" 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>Cache<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>Database<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>Email<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_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>Error reporting<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_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_CHARSET\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_CHARSET</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=\"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_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-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-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-DEFAULT_CONTENT_TYPE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_CONTENT_TYPE</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><a class=\"reference internal\" href=\"#std-setting-MIDDLEWARE_CLASSES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE_CLASSES</span></code></a></p></li>\n<li><p>Security</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_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_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_ETAGS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_ETAGS</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=\"id10\">\n<h3>Logging<a class=\"heading-anchor\" href=\"#id10\"><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>Models<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>Security<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_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</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>Serialization<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=\"id11\">\n<h3>Templates<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-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>Testing<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>URLs<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":"Core Settings","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_SECURE","anchor":"csrf-cookie-secure","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":"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":"MIRROR","anchor":"mirror","children":[]},{"title":"NAME","anchor":"std-setting-TEST_NAME","children":[]},{"title":"SERIALIZE","anchor":"serialize","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":"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":"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_CONTENT_TYPE","anchor":"default-content-type","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_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_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_CHARSET","anchor":"file-charset","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":"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_NAME","anchor":"language-cookie-name","children":[]},{"title":"LANGUAGE_COOKIE_PATH","anchor":"language-cookie-path","children":[]},{"title":"LANGUAGES","anchor":"languages","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":"MIDDLEWARE_CLASSES","anchor":"middleware-classes","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_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_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_ETAGS","anchor":"use-etags","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_DAYS","anchor":"password-reset-timeout-days","children":[]},{"title":"PASSWORD_HASHERS","anchor":"password-hashers","children":[]},{"title":"AUTH_PASSWORD_VALIDATORS","anchor":"auth-password-validators","children":[]}]},{"title":"Messages","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":"Sessions","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_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":"Sites","anchor":"sites","children":[{"title":"SITE_ID","anchor":"site-id","children":[]}]},{"title":"Static Files","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":"Prefixes (optional)","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":"Cache","anchor":"cache","children":[]},{"title":"Database","anchor":"database","children":[]},{"title":"Debugging","anchor":"debugging","children":[]},{"title":"Email","anchor":"email","children":[]},{"title":"Error reporting","anchor":"error-reporting","children":[]},{"title":"File uploads","anchor":"file-uploads","children":[]},{"title":"Globalization (i18n/l10n)","anchor":"globalization-i18n-l10n","children":[]},{"title":"HTTP","anchor":"http","children":[]},{"title":"Logging","anchor":"id10","children":[]},{"title":"Models","anchor":"models","children":[]},{"title":"Security","anchor":"security","children":[]},{"title":"Serialization","anchor":"serialization","children":[]},{"title":"Templates","anchor":"id11","children":[]},{"title":"Testing","anchor":"testing","children":[]},{"title":"URLs","anchor":"urls","children":[]}]}],"breadcrumbs":[{"docname":"ref/index","title":"API Reference","url":"/es/1.10/ref/"}],"prev":{"docname":"ref/schema-editor","title":"SchemaEditor","url":"/es/1.10/ref/schema-editor/"},"next":{"docname":"ref/signals","title":"Signals","url":"/es/1.10/ref/signals/"},"formats":{"html":"/es/1.10/ref/settings/","markdown":"/es/1.10/ref/settings.md","json":"/es/1.10/ref/settings.json"},"source":"https://github.com/django/django/blob/stable/1.10.x/docs/ref/settings.txt","official":"https://docs.djangoproject.com/es/1.10/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","fr","ja","id","pt-br","es","el","pl"]}