{"title":"Configurações","version":"2.1","locale":"pt-br","docname":"ref/settings","url":"/pt-br/2.1/ref/settings/","canonical":"https://djangodocs.dev/pt-br/2.1/ref/settings/","summary":"Core Settings Autenticação Mensagens Sessões Sites Arquivos Estáticos Core Settings Topical Index Aviso Be careful when you override settings, especially when the…","html":"<h1>Configurações<a class=\"heading-anchor\" href=\"#settings\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h1>\n<nav class=\"contents local\" id=\"sumario\">\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#core-settings\" id=\"id13\">Core Settings</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#auth\" id=\"id14\">Autenticação</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#messages\" id=\"id15\">Mensagens</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#sessions\" id=\"id16\">Sessões</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#sites\" id=\"id17\">Sites</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#static-files\" id=\"id18\">Arquivos Estáticos</a></p></li>\n<li><p><a class=\"reference internal\" href=\"#core-settings-topical-index\" id=\"id19\">Core Settings Topical Index</a></p></li>\n</ul>\n</nav>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</p>\n<p>Be careful when you override settings, especially when the default value\nis a non-empty list or dictionary, such as <a class=\"reference internal\" href=\"#std-setting-STATICFILES_FINDERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_FINDERS</span></code></a>.\nMake sure you keep the components required by the features of Django you\nwish to use.</p>\n</aside>\n<section id=\"core-settings\">\n<h2><a class=\"toc-backref\" href=\"#id13\" role=\"doc-backlink\">Core Settings</a><a class=\"headerlink\" href=\"#core-settings\" title=\"Link para este cabeçalho\">¶</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=\"/pt-br/2.1/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 para este cabeçalho</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 para este cabeçalho</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<a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG=False</span></code></a> and <a class=\"reference internal\" href=\"/pt-br/2.1/topics/logging/#django.utils.log.AdminEmailHandler\" title=\"django.utils.log.AdminEmailHandler\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">AdminEmailHandler</span></code></a>\nis configured in <a class=\"reference internal\" href=\"#std-setting-LOGGING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOGGING</span></code></a> (done by default), Django emails these\npeople the details of exceptions raised in the request/response cycle.</p>\n<p>Each item in the list should be a tuple of (Full name, email address). Example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[(</span><span class=\"s1\">&#39;John&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;john@example.com&#39;</span><span class=\"p\">),</span> <span class=\"p\">(</span><span class=\"s1\">&#39;Mary&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;mary@example.com&#39;</span><span class=\"p\">)]</span>\n</code></pre></div>\n</section>\n<section id=\"allowed-hosts\">\n<span id=\"std-setting-ALLOWED_HOSTS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code><a class=\"heading-anchor\" href=\"#allowed-hosts\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/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=\"/pt-br/2.1/ref/request-response/#django.http.HttpRequest.get_host\" title=\"django.http.HttpRequest.get_host\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">django.http.HttpRequest.get_host()</span></code></a> method will raise\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/exceptions/#django.core.exceptions.SuspiciousOperation\" title=\"django.core.exceptions.SuspiciousOperation\"><code class=\"xref py py-exc docutils literal notranslate\"><span class=\"pre\">SuspiciousOperation</span></code></a>.</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code> is empty, the host\nis validated against <code class=\"docutils literal notranslate\"><span class=\"pre\">['localhost',</span> <span class=\"pre\">'127.0.0.1',</span> <span class=\"pre\">'[::1]']</span></code>.</p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code> is also <a class=\"reference internal\" href=\"/pt-br/2.1/topics/testing/advanced/#topics-testing-advanced-multiple-hosts\"><span class=\"std std-ref\">checked when running tests</span></a>.</p>\n<p>Essa validação só é aplicada através do método <a class=\"reference internal\" href=\"/pt-br/2.1/ref/request-response/#django.http.HttpRequest.get_host\" title=\"django.http.HttpRequest.get_host\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">get_host()</span></code></a>; se o seu código acessa o cabeçalho <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> diretamente do <code class=\"docutils literal notranslate\"><span class=\"pre\">request.META</span></code> você está contornando essa proteção de segurança.</p>\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 para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.common.CommonMiddleware\" title=\"django.middleware.common.CommonMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">CommonMiddleware</span></code></a> is installed\n(see <a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão:</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 para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/topics/cache/#cache-key-transformation\"><span class=\"std std-ref\">cache documentation</span></a> for more\ninformation.</p>\n</section>\n<section id=\"key-prefix\">\n<span id=\"std-setting-CACHES-KEY_PREFIX\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">KEY_PREFIX</span></code><a class=\"heading-anchor\" href=\"#key-prefix\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/cache/#cache-key-prefixing\"><span class=\"std std-ref\">cache documentation</span></a> for more information.</p>\n</section>\n<section id=\"location\">\n<span id=\"std-setting-CACHES-LOCATION\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">LOCATION</span></code><a class=\"heading-anchor\" href=\"#location\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/topics/cache/#cache-arguments\"><span class=\"std std-ref\">cache arguments</span></a> documentation. For more information,\nconsult your backend module’s own documentation.</p>\n</section>\n<section id=\"timeout\">\n<span id=\"std-setting-CACHES-TIMEOUT\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">TIMEOUT</span></code><a class=\"heading-anchor\" href=\"#timeout\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/topics/cache/#cache-versioning\"><span class=\"std std-ref\">cache documentation</span></a> for more information.</p>\n</section>\n</section>\n<section id=\"cache-middleware-alias\">\n<span id=\"std-setting-CACHE_MIDDLEWARE_ALIAS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CACHE_MIDDLEWARE_ALIAS</span></code><a class=\"heading-anchor\" href=\"#cache-middleware-alias\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/cache/#the-per-site-cache\"><span class=\"std std-ref\">cache middleware</span></a>.</p>\n</section>\n<section id=\"cache-middleware-key-prefix\">\n<span id=\"std-setting-CACHE_MIDDLEWARE_KEY_PREFIX\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CACHE_MIDDLEWARE_KEY_PREFIX</span></code><a class=\"heading-anchor\" href=\"#cache-middleware-key-prefix\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/cache/#the-per-site-cache\"><span class=\"std std-ref\">cache\nmiddleware</span></a>. This prefix is combined with the\n<a class=\"reference internal\" href=\"#std-setting-CACHES-KEY_PREFIX\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">KEY_PREFIX</span></code></a> setting; it does not replace it.</p>\n<p>See <a class=\"reference internal\" href=\"/pt-br/2.1/topics/cache/\"><span class=\"doc\">O framework de “cache” do Django</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 para este cabeçalho</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=\"/pt-br/2.1/topics/cache/#the-per-site-cache\"><span class=\"std std-ref\">cache middleware</span></a>.</p>\n<p>See <a class=\"reference internal\" href=\"/pt-br/2.1/topics/cache/\"><span class=\"doc\">O framework de “cache” do Django</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 para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/ref/csrf/#csrf-limitations\"><span class=\"std std-ref\">CSRF limitations</span></a> section.</p>\n</section>\n<section id=\"csrf-cookie-httponly\">\n<span id=\"std-setting-CSRF_COOKIE_HTTPONLY\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_HTTPONLY</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-httponly\"><span class=\"visually-hidden\">Link para este cabeçalho</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>Designating the CSRF cookie as <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpOnly</span></code> doesn’t offer any practical\nprotection because CSRF is only to protect against cross-domain attacks. If an\nattacker can read the cookie via JavaScript, they’re already on the same domain\nas far as the browser knows, so they can do anything they like anyway. (XSS is\na much bigger hole than CSRF.)</p>\n<p>Although the setting offers little practical benefit, it’s sometimes required\nby security auditors.</p>\n<p>If you enable this and need to send the value of the CSRF token with an AJAX\nrequest, your JavaScript must pull the value <a class=\"reference internal\" href=\"/pt-br/2.1/ref/csrf/#acquiring-csrf-token-from-html\"><span class=\"std std-ref\">from a hidden CSRF token\nform input</span></a> instead of <a class=\"reference internal\" href=\"/pt-br/2.1/ref/csrf/#acquiring-csrf-token-from-cookie\"><span class=\"std std-ref\">from the cookie</span></a>.</p>\n<p>See <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_HTTPONLY</span></code></a> for details on <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpOnly</span></code>.</p>\n</section>\n<section id=\"csrf-cookie-name\">\n<span id=\"std-setting-CSRF_COOKIE_NAME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_NAME</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-name\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/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 para este cabeçalho</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-samesite\">\n<span id=\"std-setting-CSRF_COOKIE_SAMESITE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SAMESITE</span></code><a class=\"heading-anchor\" href=\"#csrf-cookie-samesite\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"2.1\">\n<p class=\"version-note-title\">New in Django 2.1</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'Lax'</span></code></p>\n<p>The value of the <a class=\"reference external\" href=\"https://www.owasp.org/index.php/SameSite\">SameSite</a> flag on the CSRF cookie. This flag prevents the\ncookie from being sent in cross-site requests.</p>\n<p>See <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_SAMESITE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SAMESITE</span></code></a> for details about <code class=\"docutils literal notranslate\"><span class=\"pre\">SameSite</span></code>.</p>\n</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 para este cabeçalho</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-use-sessions\">\n<span id=\"std-setting-CSRF_USE_SESSIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_USE_SESSIONS</span></code><a class=\"heading-anchor\" href=\"#csrf-use-sessions\"><span class=\"visually-hidden\">Link para este cabeçalho</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 store the CSRF token in the user’s session instead of in a cookie.\nIt requires the use of <a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/sessions/#module-django.contrib.sessions\" title=\"django.contrib.sessions: Provides session management for Django projects.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.sessions</span></code></a>.</p>\n<p>Storing the CSRF token in a cookie (Django’s default) is safe, but storing it\nin the session is common practice in other web frameworks and therefore\nsometimes demanded by security auditors.</p>\n</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 para este cabeçalho</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=\"/pt-br/2.1/ref/csrf/\"><span class=\"doc\">CSRF protection</span></a>. The function should have\nthis signature:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">csrf_failure</span><span class=\"p\">(</span><span class=\"n\">request</span><span class=\"p\">,</span> <span class=\"n\">reason</span><span class=\"o\">=</span><span class=\"s2\">&quot;&quot;</span><span class=\"p\">):</span>\n    <span class=\"o\">...</span>\n</code></pre></div>\n<p>where <code class=\"docutils literal notranslate\"><span class=\"pre\">reason</span></code> is a short message (intended for developers or logging, not\nfor end users) indicating the reason the request was rejected. It should return\nan <a class=\"reference internal\" href=\"/pt-br/2.1/ref/request-response/#django.http.HttpResponseForbidden\" title=\"django.http.HttpResponseForbidden\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">HttpResponseForbidden</span></code></a>.</p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">django.views.csrf.csrf_failure()</span></code> accepts an additional <code class=\"docutils literal notranslate\"><span class=\"pre\">template_name</span></code>\nparameter that defaults to <code class=\"docutils literal notranslate\"><span class=\"pre\">'403_csrf.html'</span></code>. If a template with that name\nexists, it will be used to render the page.</p>\n</section>\n<section id=\"csrf-header-name\">\n<span id=\"std-setting-CSRF_HEADER_NAME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">CSRF_HEADER_NAME</span></code><a class=\"heading-anchor\" href=\"#csrf-header-name\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\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 para este cabeçalho</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 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=\"/pt-br/2.1/ref/request-response/#django.http.HttpRequest.is_secure\" title=\"django.http.HttpRequest.is_secure\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">secure</span></code></a> unsafe\nrequest, Django’s CSRF protection requires that the request have a <code class=\"docutils literal notranslate\"><span class=\"pre\">Referer</span></code>\nheader that matches the origin present in the <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> header. This prevents,\nfor example, a <code class=\"docutils literal notranslate\"><span class=\"pre\">POST</span></code> request from <code class=\"docutils literal notranslate\"><span class=\"pre\">subdomain.example.com</span></code> from succeeding\nagainst <code class=\"docutils literal notranslate\"><span class=\"pre\">api.example.com</span></code>. If you need cross-origin unsafe requests over\nHTTPS, continuing the example, add <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;subdomain.example.com&quot;</span></code> to this list.\nThe setting also supports subdomains, so you could add <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;.example.com&quot;</span></code>, for\nexample, to allow access from all subdomains of <code class=\"docutils literal notranslate\"><span class=\"pre\">example.com</span></code>.</p>\n</section>\n<section id=\"databases\">\n<span id=\"std-setting-DATABASES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATABASES</span></code><a class=\"heading-anchor\" href=\"#databases\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/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 para este cabeçalho</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=\"/pt-br/2.1/topics/db/transactions/#deactivate-transaction-management\"><span class=\"std std-ref\">disable Django’s transaction\nmanagement</span></a> and implement your own.</p>\n</section>\n<section id=\"engine\">\n<span id=\"std-setting-DATABASE-ENGINE\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">ENGINE</span></code><a class=\"heading-anchor\" href=\"#engine\"><span class=\"visually-hidden\">Link para este cabeçalho</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</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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/ref/databases/\"><span class=\"doc\">Database Backends</span></a> documentation. For more information,\nconsult your backend module’s own documentation.</p>\n</section>\n<section id=\"password\">\n<span id=\"std-setting-PASSWORD\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">PASSWORD</span></code><a class=\"heading-anchor\" href=\"#password\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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>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>. This inner option of\nthe <a class=\"reference internal\" href=\"#std-setting-DATABASES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATABASES</span></code></a> setting accepts the same values as the general\n<a class=\"reference internal\" href=\"#std-setting-TIME_ZONE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code></a> setting.</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>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<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=\"disable-server-side-cursors\">\n<span id=\"std-setting-DATABASE-DISABLE_SERVER_SIDE_CURSORS\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">DISABLE_SERVER_SIDE_CURSORS</span></code><a class=\"heading-anchor\" href=\"#disable-server-side-cursors\"><span class=\"visually-hidden\">Link para este cabeçalho</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> if you want to disable the use of server-side cursors with\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/models/querysets/#django.db.models.query.QuerySet.iterator\" title=\"django.db.models.query.QuerySet.iterator\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">QuerySet.iterator()</span></code></a>. <a class=\"reference internal\" href=\"/pt-br/2.1/ref/databases/#transaction-pooling-server-side-cursors\"><span class=\"std std-ref\">Transaction pooling and server-side cursors</span></a>\ndescribes the use case.</p>\n<p>This is a PostgreSQL-specific setting.</p>\n</section>\n<section id=\"user\">\n<span id=\"std-setting-USER\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">USER</span></code><a class=\"heading-anchor\" href=\"#user\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/topics/testing/advanced/#topics-testing-creation-dependencies\"><span class=\"std std-ref\">controlling the creation order of test databases</span></a> for details.</p>\n</section>\n<section id=\"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 para este cabeçalho</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=\"/pt-br/2.1/topics/testing/advanced/#topics-testing-primaryreplica\"><span class=\"std std-ref\">testing primary/replica configurations</span></a> for details.</p>\n</section>\n<section id=\"std-setting-TEST_NAME\">\n<span id=\"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 para este cabeçalho</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>Veja <a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</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=\"/pt-br/2.1/topics/testing/overview/#test-case-serialized-rollback\"><span class=\"std std-ref\">serialized_rollback=True</span></a>.</p>\n</section>\n<section id=\"template\">\n<span id=\"std-setting-TEST_TEMPLATE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">TEMPLATE</span></code><a class=\"heading-anchor\" href=\"#template\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>This is a PostgreSQL-specific setting.</p>\n<p>The name of a <a class=\"reference external\" href=\"https://www.postgresql.org/docs/current/static/sql-createdatabase.html\">template</a> (e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">'template0'</span></code>) from which to create the test\ndatabase.</p>\n</section>\n<section id=\"create-db\">\n<span id=\"std-setting-TEST_CREATE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">CREATE_DB</span></code><a class=\"heading-anchor\" href=\"#create-db\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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=\"id4\"></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 para este cabeçalho</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=\"id5\"></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 para este cabeçalho</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</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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Padrão: <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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">'500M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The maximum size that the DATAFILE_TMP is allowed to grow to.</p>\n</section>\n<section id=\"datafile-size\">\n<span id=\"std-setting-DATAFILE_SIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_SIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-size\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h5>\n<aside class=\"version-note version-added\" data-version=\"2.0\">\n<p class=\"version-note-title\">New in Django 2.0</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'50M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The initial size of the DATAFILE.</p>\n</section>\n<section id=\"datafile-tmp-size\">\n<span id=\"std-setting-DATAFILE_TMP_SIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_TMP_SIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-tmp-size\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h5>\n<aside class=\"version-note version-added\" data-version=\"2.0\">\n<p class=\"version-note-title\">New in Django 2.0</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'50M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The initial size of the DATAFILE_TMP.</p>\n</section>\n<section id=\"datafile-extsize\">\n<span id=\"std-setting-DATAFILE_EXTSIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_EXTSIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-extsize\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h5>\n<aside class=\"version-note version-added\" data-version=\"2.0\">\n<p class=\"version-note-title\">New in Django 2.0</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'25M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The amount by which the DATAFILE is extended when more space is required.</p>\n</section>\n<section id=\"datafile-tmp-extsize\">\n<span id=\"std-setting-DATAFILE_TMP_EXTSIZE\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">DATAFILE_TMP_EXTSIZE</span></code><a class=\"heading-anchor\" href=\"#datafile-tmp-extsize\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h5>\n<aside class=\"version-note version-added\" data-version=\"2.0\">\n<p class=\"version-note-title\">New in Django 2.0</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'25M'</span></code></p>\n<p>This is an Oracle-specific setting.</p>\n<p>The amount by which the DATAFILE_TMP is extended when more space is required.</p>\n</section>\n</section>\n</section>\n<section id=\"data-upload-max-memory-size\">\n<span id=\"std-setting-DATA_UPLOAD_MAX_MEMORY_SIZE\"></span><h3>DATA_UPLOAD_MAX_MEMORY_SIZE<a class=\"heading-anchor\" href=\"#data-upload-max-memory-size\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/exceptions/#django.core.exceptions.SuspiciousOperation\" title=\"django.core.exceptions.SuspiciousOperation\"><code class=\"xref py py-exc docutils literal notranslate\"><span class=\"pre\">SuspiciousOperation</span></code></a> (<code class=\"docutils literal notranslate\"><span class=\"pre\">RequestDataTooBig</span></code>) is\nraised. The check is done when accessing <code class=\"docutils literal notranslate\"><span class=\"pre\">request.body</span></code> or <code class=\"docutils literal notranslate\"><span class=\"pre\">request.POST</span></code>\nand is calculated against the total request size excluding any file upload\ndata. You can set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> to disable the check. Applications that are\nexpected to receive unusually large form posts should tune this setting.</p>\n<p>The amount of request data is correlated to the amount of memory needed to\nprocess the request and populate the GET and POST dictionaries. Large requests\ncould be used as a denial-of-service attack vector if left unchecked. Since web\nservers don’t typically perform deep request inspection, it’s not possible to\nperform a similar check at that level.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_MAX_MEMORY_SIZE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_MAX_MEMORY_SIZE</span></code></a>.</p>\n</section>\n<section id=\"data-upload-max-number-fields\">\n<span id=\"std-setting-DATA_UPLOAD_MAX_NUMBER_FIELDS\"></span><h3>DATA_UPLOAD_MAX_NUMBER_FIELDS<a class=\"heading-anchor\" href=\"#data-upload-max-number-fields\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\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=\"/pt-br/2.1/ref/exceptions/#django.core.exceptions.SuspiciousOperation\" title=\"django.core.exceptions.SuspiciousOperation\"><code class=\"xref py py-exc docutils literal notranslate\"><span class=\"pre\">SuspiciousOperation</span></code></a> (<code class=\"docutils literal notranslate\"><span class=\"pre\">TooManyFields</span></code>) is\nraised. You can set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> to disable the check. Applications that\nare expected to receive an unusually large number of form fields should tune\nthis setting.</p>\n<p>The number of request parameters is correlated to the amount of time needed to\nprocess the request and populate the GET and POST dictionaries. Large requests\ncould be used as a denial-of-service attack vector if left unchecked. Since web\nservers don’t typically perform deep request inspection, it’s not possible to\nperform a similar check at that level.</p>\n</section>\n<section id=\"database-routers\">\n<span id=\"std-setting-DATABASE_ROUTERS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATABASE_ROUTERS</span></code><a class=\"heading-anchor\" href=\"#database-routers\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/db/multi-db/#topics-db-multi-db-routing\"><span class=\"std std-ref\">automatic database routing in multi\ndatabase configurations</span></a>.</p>\n</section>\n<section id=\"date-format\">\n<span id=\"std-setting-DATE_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code><a class=\"heading-anchor\" href=\"#date-format\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-SHORT_DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"date-input-formats\">\n<span id=\"std-setting-DATE_INPUT_FORMATS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code><a class=\"heading-anchor\" href=\"#date-input-formats\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão:</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=\"(em Python v3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">date</span></code></a>\ntemplate filter.</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the locale-dictated format has higher\nprecedence and will be applied instead.</p>\n<p>Veja também <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> e <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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-SHORT_DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATETIME_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"datetime-input-formats\">\n<span id=\"std-setting-DATETIME_INPUT_FORMATS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DATETIME_INPUT_FORMATS</span></code><a class=\"heading-anchor\" href=\"#datetime-input-formats\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão:</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=\"(em Python v3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">date</span></code></a>\ntemplate filter.</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the locale-dictated format has higher\nprecedence and will be applied instead.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-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 para este cabeçalho</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>Nunca faça o deploy de um site em produção com o <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> ativado.</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=\"/pt-br/2.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> sets <code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code> for convenience.</p>\n</aside>\n</section>\n<section id=\"debug-propagate-exceptions\">\n<span id=\"std-setting-DEBUG_PROPAGATE_EXCEPTIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG_PROPAGATE_EXCEPTIONS</span></code><a class=\"heading-anchor\" href=\"#debug-propagate-exceptions\"><span class=\"visually-hidden\">Link para este cabeçalho</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 <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, Django’s exception handling of view functions\n(<a class=\"reference internal\" href=\"/pt-br/2.1/ref/urls/#django.conf.urls.handler500\" title=\"django.conf.urls.handler500\"><code class=\"xref py py-data docutils literal notranslate\"><span class=\"pre\">handler500</span></code></a>, or the debug view if <a class=\"reference internal\" href=\"#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a>\nis <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>) and logging of 500 responses (<a class=\"reference internal\" href=\"/pt-br/2.1/topics/logging/#django-request-logger\"><span class=\"std std-ref\">django.request</span></a>) is\nskipped and exceptions propagate upwards.</p>\n<p>This can be useful for some test setups. It shouldn’t be used on a live site\nunless you want your web server (instead of Django) to generate “Internal\nServer Error” responses. In that case, make sure your server doesn’t show the\nstack trace or other sensitive information in the response.</p>\n</section>\n<section id=\"decimal-separator\">\n<span id=\"std-setting-DECIMAL_SEPARATOR\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DECIMAL_SEPARATOR</span></code><a class=\"heading-anchor\" href=\"#decimal-separator\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">'.'</span></code> (.)</p>\n<p>Default decimal separator used when formatting decimal numbers.</p>\n<p>Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the locale-dictated\nformat has higher precedence and will be applied instead.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a> and\n<a class=\"reference internal\" href=\"#std-setting-USE_THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_THOUSAND_SEPARATOR</span></code></a>.</p>\n</section>\n<section id=\"default-charset\">\n<span id=\"std-setting-DEFAULT_CHARSET\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_CHARSET</span></code><a class=\"heading-anchor\" href=\"#default-charset\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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<aside class=\"version-note version-deprecated\" data-version=\"2.0\">\n<p class=\"version-note-title\">Deprecated since Django 2.0</p><p><span class=\"versionmodified deprecated\">Descontinuado desde a versão 2.0: </span>This setting is deprecated because it doesn’t interact well with\nthird-party apps and is obsolete since HTML5 has mostly superseded XHTML.</p>\n</aside>\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 para este cabeçalho</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=\"/pt-br/2.1/howto/error-reporting/#django.views.debug.SafeExceptionReporterFilter\" title=\"django.views.debug.SafeExceptionReporterFilter\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.views.debug.SafeExceptionReporterFilter</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>Default exception reporter filter class to be used if none has been assigned to\nthe <a class=\"reference internal\" href=\"/pt-br/2.1/ref/request-response/#django.http.HttpRequest\" title=\"django.http.HttpRequest\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">HttpRequest</span></code></a> instance yet.\nSee <a class=\"reference internal\" href=\"/pt-br/2.1/howto/error-reporting/#filtering-error-reports\"><span class=\"std std-ref\">Filtering error reports</span></a>.</p>\n</section>\n<section id=\"default-file-storage\">\n<span id=\"std-setting-DEFAULT_FILE_STORAGE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_FILE_STORAGE</span></code><a class=\"heading-anchor\" href=\"#default-file-storage\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/files/storage/#django.core.files.storage.FileSystemStorage\" title=\"django.core.files.storage.FileSystemStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.core.files.storage.FileSystemStorage</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>Default file storage class to be used for any file-related operations that don’t\nspecify a particular storage system. See <a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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 para este cabeçalho</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=\"/pt-br/2.1/topics/db/tablespaces/\"><span class=\"doc\">Tablespaces</span></a>).</p>\n</section>\n<section id=\"default-tablespace\">\n<span id=\"std-setting-DEFAULT_TABLESPACE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DEFAULT_TABLESPACE</span></code><a class=\"heading-anchor\" href=\"#default-tablespace\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/db/tablespaces/\"><span class=\"doc\">Tablespaces</span></a>).</p>\n</section>\n<section id=\"disallowed-user-agents\">\n<span id=\"std-setting-DISALLOWED_USER_AGENTS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">DISALLOWED_USER_AGENTS</span></code><a class=\"heading-anchor\" href=\"#disallowed-user-agents\"><span class=\"visually-hidden\">Link para este cabeçalho</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\nthat are not allowed to visit any page, systemwide. Use this for bots/crawlers.\nThis is only used if <code class=\"docutils literal notranslate\"><span class=\"pre\">CommonMiddleware</span></code> is installed (see\n<a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/middleware/\"><span class=\"doc\">Middleware</span></a>).</p>\n</section>\n<section id=\"email-backend\">\n<span id=\"std-setting-EMAIL_BACKEND\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_BACKEND</span></code><a class=\"heading-anchor\" href=\"#email-backend\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code><a class=\"reference internal\" href=\"/pt-br/2.1/topics/email/#django.core.mail.backends.smtp.EmailBackend\" title=\"django.core.mail.backends.smtp.EmailBackend\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.core.mail.backends.smtp.EmailBackend</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>O “backend” para usar para enviar emails. Para a lista de “backends”disponíveis veja <a class=\"reference internal\" href=\"/pt-br/2.1/topics/email/\"><span class=\"doc\">Enviando e-mail</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 para este cabeçalho</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">'localhost'</span></code></p>\n<p>The host to use for sending email.</p>\n<p>Veja também <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 para este cabeçalho</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 para este cabeçalho</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>Veja também <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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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-localtime\">\n<span id=\"std-setting-EMAIL_USE_LOCALTIME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_LOCALTIME</span></code><a class=\"heading-anchor\" href=\"#email-use-localtime\"><span class=\"visually-hidden\">Link para este cabeçalho</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 send the SMTP <code class=\"docutils literal notranslate\"><span class=\"pre\">Date</span></code> header of email messages in the local time\nzone (<code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>) or in UTC (<code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code>).</p>\n</section>\n<section id=\"email-use-tls\">\n<span id=\"std-setting-EMAIL_USE_TLS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_TLS</span></code><a class=\"heading-anchor\" href=\"#email-use-tls\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão:</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>Veja <a class=\"reference internal\" href=\"/pt-br/2.1/topics/files/\"><span class=\"doc\">Managing files</span></a> para detalhes.</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/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 para este cabeçalho</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=\"/pt-br/2.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command. See\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> for details on overriding it.</p>\n<p>This value mirrors the functionality and caveats of the\n<a class=\"reference internal\" href=\"#std-setting-FILE_UPLOAD_PERMISSIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_PERMISSIONS</span></code></a> setting.</p>\n</section>\n<section id=\"file-upload-permissions\">\n<span id=\"std-setting-FILE_UPLOAD_PERMISSIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FILE_UPLOAD_PERMISSIONS</span></code><a class=\"heading-anchor\" href=\"#file-upload-permissions\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"(em Python v3.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=\"/pt-br/2.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command. See\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> for details on overriding it.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</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 para este cabeçalho</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>Veja <a class=\"reference internal\" href=\"/pt-br/2.1/topics/files/\"><span class=\"doc\">Managing files</span></a> para detalhes.</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code> (Domingo)</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 para este cabeçalho</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=\"/pt-br/2.1/howto/initial-data/#initial-data-via-fixtures\"><span class=\"std std-ref\">Provendo dados com fixtures.</span></a> and <a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</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=\"/pt-br/2.1/ref/applications/#django.setup\" title=\"django.setup\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">django.setup()</span></code></a> to set the URL resolver script prefix outside of the\nrequest/response cycle (e.g. in management commands and standalone scripts) to\ngenerate correct URLs when <code class=\"docutils literal notranslate\"><span class=\"pre\">SCRIPT_NAME</span></code> is not <code class=\"docutils literal notranslate\"><span class=\"pre\">/</span></code>.</p>\n</section>\n<section id=\"form-renderer\">\n<span id=\"std-setting-FORM_RENDERER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FORM_RENDERER</span></code><a class=\"heading-anchor\" href=\"#form-renderer\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/forms/renderers/#django.forms.renderers.DjangoTemplates\" title=\"django.forms.renderers.DjangoTemplates\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.forms.renderers.DjangoTemplates</span></code></a><code class=\"docutils literal notranslate\"><span class=\"pre\">'</span></code></p>\n<p>The class that renders form widgets. It must implement <a class=\"reference internal\" href=\"/pt-br/2.1/ref/forms/renderers/#low-level-widget-render-api\"><span class=\"std std-ref\">the low-level\nrender API</span></a>.</p>\n</section>\n<section id=\"format-module-path\">\n<span id=\"std-setting-FORMAT_MODULE_PATH\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">FORMAT_MODULE_PATH</span></code><a class=\"heading-anchor\" href=\"#format-module-path\"><span class=\"visually-hidden\">Link para este cabeçalho</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 custom format definitions\nfor project locales. If not <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, Django will check for a <code class=\"docutils literal notranslate\"><span class=\"pre\">formats.py</span></code>\nfile, under the directory named as the current locale, and will use the\nformats defined in this file.</p>\n<p>For example, if <a class=\"reference internal\" href=\"#std-setting-FORMAT_MODULE_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FORMAT_MODULE_PATH</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">mysite.formats</span></code>,\nand current language is <code class=\"docutils literal notranslate\"><span class=\"pre\">en</span></code> (English), Django will expect a directory tree\nlike:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">mysite</span><span class=\"o\">/</span>\n    <span class=\"n\">formats</span><span class=\"o\">/</span>\n        <span class=\"fm\">__init__</span><span class=\"o\">.</span><span class=\"n\">py</span>\n        <span class=\"n\">en</span><span class=\"o\">/</span>\n            <span class=\"fm\">__init__</span><span class=\"o\">.</span><span class=\"n\">py</span>\n            <span class=\"n\">formats</span><span class=\"o\">.</span><span class=\"n\">py</span>\n</code></pre></div>\n<p>You can also set this setting to a list of Python paths, for example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">FORMAT_MODULE_PATH</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"s1\">&#39;mysite.formats&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;some_app.formats&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>When Django searches for a certain format, it will go through all given Python\npaths until it finds a module that actually defines the given format. This\nmeans that formats defined in packages farther up in the list will take\nprecedence over the same formats in packages farther down.</p>\n<p>Available formats are:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATE_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>,</p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DATETIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DECIMAL_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DECIMAL_SEPARATOR</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-FIRST_DAY_OF_WEEK\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FIRST_DAY_OF_WEEK</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MONTH_DAY_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MONTH_DAY_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-NUMBER_GROUPING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">NUMBER_GROUPING</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SHORT_DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SHORT_DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATETIME_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-THOUSAND_SEPARATOR\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-TIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_INPUT_FORMATS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-YEAR_MONTH_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">YEAR_MONTH_FORMAT</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"ignorable-404-urls\">\n<span id=\"std-setting-IGNORABLE_404_URLS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">IGNORABLE_404_URLS</span></code><a class=\"heading-anchor\" href=\"#ignorable-404-urls\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/howto/error-reporting/\"><span class=\"doc\">Relatório de erro</span></a>). Regular expressions are matched against\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/request-response/#django.http.HttpRequest.get_full_path\" title=\"django.http.HttpRequest.get_full_path\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">request's</span> <span class=\"pre\">full</span> <span class=\"pre\">paths</span></code></a> (including\nquery string, if any). Use this if your site does not provide a commonly\nrequested file such as <code class=\"docutils literal notranslate\"><span class=\"pre\">favicon.ico</span></code> or <code class=\"docutils literal notranslate\"><span class=\"pre\">robots.txt</span></code>.</p>\n<p>This is only used if\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/middleware/#django.middleware.common.BrokenLinkEmailsMiddleware\" title=\"django.middleware.common.BrokenLinkEmailsMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">BrokenLinkEmailsMiddleware</span></code></a> is enabled (see\n<a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/middleware/\"><span class=\"doc\">Middleware</span></a>).</p>\n</section>\n<section id=\"installed-apps\">\n<span id=\"std-setting-INSTALLED_APPS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code><a class=\"heading-anchor\" href=\"#installed-apps\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/applications/\"><span class=\"doc\">Learn more about application configurations</span></a>.</p>\n<aside class=\"admonition-use-the-application-registry-for-introspection admonition\">\n<p class=\"admonition-title\">Use the application registry for introspection</p>\n<p>Your code should never access <a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> directly. Use\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/applications/#django.apps.apps\" title=\"django.apps.apps\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">django.apps.apps</span></code></a> instead.</p>\n</aside>\n<aside class=\"admonition-application-names-and-labels-must-be-unique-in-setting-installed-apps admonition\">\n<p class=\"admonition-title\">Application names and labels must be unique in\n            <a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a></p>\n<p>Application <a class=\"reference internal\" href=\"/pt-br/2.1/ref/applications/#django.apps.AppConfig.name\" title=\"django.apps.AppConfig.name\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">names</span></code></a> — the dotted Python\npath to the application package — must be unique. There is no way to\ninclude the same application twice, short of duplicating its code under\nanother name.</p>\n<p>Application <a class=\"reference internal\" href=\"/pt-br/2.1/ref/applications/#django.apps.AppConfig.label\" title=\"django.apps.AppConfig.label\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">labels</span></code></a> — by default the\nfinal part of the name — must be unique too. For example, you can’t\ninclude both <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.auth</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">myproject.auth</span></code>. However, you\ncan relabel an application with a custom configuration that defines a\ndifferent <a class=\"reference internal\" href=\"/pt-br/2.1/ref/applications/#django.apps.AppConfig.label\" title=\"django.apps.AppConfig.label\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">label</span></code></a>.</p>\n<p>These rules apply regardless of whether <a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a>\nreferences application configuration classes or application packages.</p>\n</aside>\n<p>When several applications provide different versions of the same resource\n(template, static file, management command, translation), the application\nlisted first in <a class=\"reference internal\" href=\"#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> has precedence.</p>\n</section>\n<section id=\"internal-ips\">\n<span id=\"std-setting-INTERNAL_IPS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">INTERNAL_IPS</span></code><a class=\"heading-anchor\" href=\"#internal-ips\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/templates/api/#django.template.context_processors.debug\" title=\"django.template.context_processors.debug\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">debug()</span></code></a> context processor\nto add some variables to the template context.</p></li>\n<li><p>Can use the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/admin/admindocs/#admindocs-bookmarklets\"><span class=\"std std-ref\">admindocs bookmarklets</span></a> even if\nnot logged in as a staff user.</p></li>\n<li><p>Are marked as “internal” (as opposed to “EXTERNAL”) in\n<a class=\"reference internal\" href=\"/pt-br/2.1/topics/logging/#django.utils.log.AdminEmailHandler\" title=\"django.utils.log.AdminEmailHandler\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">AdminEmailHandler</span></code></a> emails.</p></li>\n</ul>\n</section>\n<section id=\"language-code\">\n<span id=\"std-setting-LANGUAGE_CODE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">LANGUAGE_CODE</span></code><a class=\"heading-anchor\" href=\"#language-code\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/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=\"/pt-br/2.1/topics/i18n/\"><span class=\"doc\">Internacionalização e localização</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=\"/pt-br/2.1/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 para este cabeçalho</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 para este cabeçalho</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> for cross-domain cookies, or use <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for a standard\ndomain cookie.</p>\n<p>Be cautious when updating this setting on a production site. If you update\nthis setting to enable cross-domain cookies on a site that previously used\nstandard domain cookies, existing user cookies that have the old domain\nwill not be updated. This will result in site users being unable to switch\nthe language as long as these cookies persist. The only safe and reliable\noption to perform the switch is to change the language cookie name\npermanently (via the <a class=\"reference internal\" href=\"#std-setting-LANGUAGE_COOKIE_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LANGUAGE_COOKIE_NAME</span></code></a> setting) and to add\na middleware that copies the value from the old cookie to a new one and then\ndeletes the old one.</p>\n</section>\n<section id=\"language-cookie-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 para este cabeçalho</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=\"/pt-br/2.1/topics/i18n/\"><span class=\"doc\">Internacionalização e localização</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 para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/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=\"/pt-br/2.1/topics/i18n/\"><span class=\"doc\">Internacionalização e localização</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=\"/pt-br/2.1/ref/utils/#django.utils.translation.gettext_lazy\" title=\"django.utils.translation.gettext_lazy\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">gettext_lazy()</span></code></a> function.</p>\n<p>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\">gettext_lazy</span> <span class=\"k\">as</span> <span class=\"n\">_</span>\n\n<span class=\"n\">LANGUAGES</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"p\">(</span><span class=\"s1\">&#39;de&#39;</span><span class=\"p\">,</span> <span class=\"n\">_</span><span class=\"p\">(</span><span class=\"s1\">&#39;German&#39;</span><span class=\"p\">)),</span>\n    <span class=\"p\">(</span><span class=\"s1\">&#39;en&#39;</span><span class=\"p\">,</span> <span class=\"n\">_</span><span class=\"p\">(</span><span class=\"s1\">&#39;English&#39;</span><span class=\"p\">)),</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n</section>\n<section id=\"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 para este cabeçalho</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=\"/pt-br/2.1/topics/i18n/translation/#how-django-discovers-translations\"><span class=\"std std-ref\">How Django discovers translations</span></a>.</p>\n<p>Exemplo</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 para este cabeçalho</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=\"/pt-br/2.1/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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">'logging.config.dictConfig'</span></code></p>\n<p>A path to a callable that will be used to configure logging in the\nDjango project. Points at an instance of Python’s <a class=\"reference external\" href=\"https://docs.python.org/3/library/logging.config.html#logging-config-dictschema\" title=\"(em Python v3.14)\"><span class=\"xref std std-ref\">dictConfig</span></a> configuration method by default.</p>\n<p>If you set <a class=\"reference internal\" href=\"#std-setting-LOGGING_CONFIG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOGGING_CONFIG</span></code></a> to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, the logging\nconfiguration process will be skipped.</p>\n</section>\n<section id=\"managers\">\n<span id=\"std-setting-MANAGERS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code><a class=\"heading-anchor\" href=\"#managers\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.common.BrokenLinkEmailsMiddleware\" title=\"django.middleware.common.BrokenLinkEmailsMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">BrokenLinkEmailsMiddleware</span></code></a> is enabled.</p>\n</section>\n<section id=\"media-root\">\n<span id=\"std-setting-MEDIA_ROOT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MEDIA_ROOT</span></code><a class=\"heading-anchor\" href=\"#media-root\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/files/\"><span class=\"doc\">user-uploaded\nfiles</span></a>.</p>\n<p>Example: <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;/var/www/example.com/media/&quot;</span></code></p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-MEDIA_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_URL</span></code></a>.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</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 para este cabeçalho</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=\"/pt-br/2.1/topics/files/\"><span class=\"doc\">managing stored files</span></a>. It must end in a slash if set\nto a non-empty value. You will need to <a class=\"reference internal\" href=\"/pt-br/2.1/howto/static-files/#serving-uploaded-files-in-development\"><span class=\"std std-ref\">configure these files to be served</span></a> in both development and production\nenvironments.</p>\n<p>If you want to use <code class=\"docutils literal notranslate\"><span class=\"pre\">{{</span> <span class=\"pre\">MEDIA_URL</span> <span class=\"pre\">}}</span></code> in your templates, add\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'django.template.context_processors.media'</span></code> in the <code class=\"docutils literal notranslate\"><span class=\"pre\">'context_processors'</span></code>\noption of <a class=\"reference internal\" href=\"#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TEMPLATES</span></code></a>.</p>\n<p>Example: <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;http://media.example.com/&quot;</span></code></p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</p>\n<p>Existem riscos de segurança se você estiver aceitando o upload de conteúdo de usuários não confiáveis! Veja o tópico do guia de segurança em <a class=\"reference internal\" href=\"/pt-br/2.1/topics/security/#user-uploaded-content-security\"><span class=\"std std-ref\">Conteúdo carregado por upload de usuários</span></a> para detalhes.</p>\n</aside>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</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 para este cabeçalho</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 list of middleware to use. See <a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/middleware/\"><span class=\"doc\">Middleware</span></a>.</p>\n</section>\n<section id=\"migration-modules\">\n<span id=\"std-setting-MIGRATION_MODULES\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MIGRATION_MODULES</span></code><a class=\"heading-anchor\" href=\"#migration-modules\"><span class=\"visually-hidden\">Link para este cabeçalho</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>Exemplo</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=\"/pt-br/2.1/ref/django-admin/#django-admin-makemigrations\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">makemigrations</span></code></a> will\nautomatically create the package if it doesn’t already exist.</p>\n<p>When you supply <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> as a value for an app, Django will consider the app as\nan app without migrations regardless of an existing <code class=\"docutils literal notranslate\"><span class=\"pre\">migrations</span></code> submodule.\nThis can be used, for example, in a test settings file to skip migrations while\ntesting (tables will still be created for the apps’ models). If this is used in\nyour general project settings, remember to use the <a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>. See also\n<a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>,\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 para este cabeçalho</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>Some locales use non-uniform digit grouping, e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">10,00,00,000</span></code> in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">en_IN</span></code>. For this case, you can provide a sequence with the number of digit\ngroup sizes to be applied. The first number defines the size of the group\npreceding the decimal delimiter, and each number that follows defines the size\nof preceding groups. If the sequence is terminated with <code class=\"docutils literal notranslate\"><span class=\"pre\">-1</span></code>, no further\ngrouping is performed. If the sequence terminates with a <code class=\"docutils literal notranslate\"><span class=\"pre\">0</span></code>, the last group\nsize is used for the remainder of the number.</p>\n<p>Example tuple for <code class=\"docutils literal notranslate\"><span class=\"pre\">en_IN</span></code>:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">NUMBER_GROUPING</span> <span class=\"o\">=</span> <span class=\"p\">(</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">)</span>\n</code></pre></div>\n<p>Note that if <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, then the locale-dictated\nformat has higher precedence and will be applied instead.</p>\n<p>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 para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.common.CommonMiddleware\" title=\"django.middleware.common.CommonMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">CommonMiddleware</span></code></a> is installed\n(see <a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</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\nexample <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;mydjangoapps.urls&quot;</span></code>. Can be overridden on a per-request basis by\nsetting the attribute <code class=\"docutils literal notranslate\"><span class=\"pre\">urlconf</span></code> on the incoming <code class=\"docutils literal notranslate\"><span class=\"pre\">HttpRequest</span></code>\nobject. See <a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/urls/#how-django-processes-a-request\"><span class=\"std std-ref\">Como o Django processa uma requisição</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 para este cabeçalho</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=\"/pt-br/2.1/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=\"/pt-br/2.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span> <span class=\"pre\">startproject</span></code></a> 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=\"/pt-br/2.1/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=\"/pt-br/2.1/ref/utils/#django.utils.encoding.force_bytes\" title=\"django.utils.encoding.force_bytes\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">force_bytes()</span></code></a> to convert it to the desired type.</p>\n<p>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\">Aviso</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>A chave secreta é usada para:</p>\n<ul class=\"simple\">\n<li><p>All <a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/sessions/\"><span class=\"doc\">sessions</span></a> if you are using\nany other session backend than <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.sessions.backends.cache</span></code>,\nor are using the default\n<a class=\"reference internal\" href=\"/pt-br/2.1/topics/auth/customizing/#django.contrib.auth.models.AbstractBaseUser.get_session_auth_hash\" title=\"django.contrib.auth.models.AbstractBaseUser.get_session_auth_hash\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">get_session_auth_hash()</span></code></a>.</p></li>\n<li><p>All <a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/messages/\"><span class=\"doc\">messages</span></a> if you are using\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/messages/#django.contrib.messages.storage.cookie.CookieStorage\" title=\"django.contrib.messages.storage.cookie.CookieStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">CookieStorage</span></code></a> or\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/messages/#django.contrib.messages.storage.fallback.FallbackStorage\" title=\"django.contrib.messages.storage.fallback.FallbackStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">FallbackStorage</span></code></a>.</p></li>\n<li><p>All <a class=\"reference internal\" href=\"/pt-br/2.1/topics/auth/default/#django.contrib.auth.views.PasswordResetView\" title=\"django.contrib.auth.views.PasswordResetView\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">PasswordResetView</span></code></a> tokens.</p></li>\n<li><p>Any usage of <a class=\"reference internal\" href=\"/pt-br/2.1/topics/signing/\"><span class=\"doc\">cryptographic signing</span></a>, unless a\ndifferent key is provided.</p></li>\n</ul>\n<p>If you rotate your secret key, all of the above will be invalidated.\nSecret keys are not used for passwords of users and key rotation will not\naffect them.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">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=\"/pt-br/2.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> creates a unique <code class=\"docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code> for\nconvenience.</p>\n</aside>\n</section>\n<section id=\"secure-browser-xss-filter\">\n<span id=\"std-setting-SECURE_BROWSER_XSS_FILTER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_BROWSER_XSS_FILTER</span></code><a class=\"heading-anchor\" href=\"#secure-browser-xss-filter\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> sets\nthe <a class=\"reference internal\" href=\"/pt-br/2.1/ref/middleware/#x-xss-protection\"><span class=\"std std-ref\">X-XSS-Protection: 1; mode=block</span></a> header on all responses that do not already have it.</p>\n</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 para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a>\nsets the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/middleware/#x-content-type-options\"><span class=\"std std-ref\">X-Content-Type-Options: nosniff</span></a> header on all responses that do not\nalready have it.</p>\n</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 para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> adds\nthe <code class=\"docutils literal notranslate\"><span class=\"pre\">includeSubDomains</span></code> directive to the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a>\nheader. It has no effect unless <a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code></a> is set to a\nnon-zero value.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</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=\"/pt-br/2.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a> documentation first.</p>\n</aside>\n</section>\n<section id=\"secure-hsts-preload\">\n<span id=\"std-setting-SECURE_HSTS_PRELOAD\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_PRELOAD</span></code><a class=\"heading-anchor\" href=\"#secure-hsts-preload\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> adds\nthe <code class=\"docutils literal notranslate\"><span class=\"pre\">preload</span></code> directive to the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a>\nheader. It has no effect unless <a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code></a> is set to a\nnon-zero value.</p>\n</section>\n<section id=\"secure-hsts-seconds\">\n<span id=\"std-setting-SECURE_HSTS_SECONDS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code><a class=\"heading-anchor\" href=\"#secure-hsts-seconds\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a> sets the\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a> header on all responses that do not\nalready have it.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</p>\n<p>Setting this incorrectly can irreversibly (for some time) break your site.\nRead the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP Strict Transport Security</span></a> documentation first.</p>\n</aside>\n</section>\n<section id=\"secure-proxy-ssl-header\">\n<span id=\"std-setting-SECURE_PROXY_SSL_HEADER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_PROXY_SSL_HEADER</span></code><a class=\"heading-anchor\" href=\"#secure-proxy-ssl-header\"><span class=\"visually-hidden\">Link para este cabeçalho</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>By default, <code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code> determines if a request is secure by confirming\nthat a requested URL uses <code class=\"docutils literal notranslate\"><span class=\"pre\">https://</span></code>. This method is important for Django’s\nCSRF protection, and it may be used by your own code or third-party apps.</p>\n<p>If your Django app is behind a proxy, though, the proxy may be “swallowing”\nwhether the original request uses HTTPS or not. If there is a non-HTTPS\nconnection between the proxy and Django then <code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code> would always\nreturn <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> – even for requests that were made via HTTPS by the end user.\nIn contrast, if there is an HTTPS connection between the proxy and Django then\n<code class=\"docutils literal notranslate\"><span class=\"pre\">is_secure()</span></code> would always return <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> – even for requests that were\nmade originally via HTTP.</p>\n<p>In this situation, configure your proxy to set a custom HTTP header that tells\nDjango whether the request came in via HTTPS, and set\n<code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_PROXY_SSL_HEADER</span></code> so that Django knows what header to look for.</p>\n<p>Set a tuple with two elements – the name of the header to look for and the\nrequired value. For example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">SECURE_PROXY_SSL_HEADER</span> <span class=\"o\">=</span> <span class=\"p\">(</span><span class=\"s1\">&#39;HTTP_X_FORWARDED_PROTO&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;https&#39;</span><span class=\"p\">)</span>\n</code></pre></div>\n<p>This tells Django to trust the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Proto</span></code> header that comes from our\nproxy, and any time its value is <code class=\"docutils literal notranslate\"><span class=\"pre\">'https'</span></code>, then the request is guaranteed to\nbe secure (i.e., it originally came in via HTTPS).</p>\n<p>You should <em>only</em> set this setting if you control your proxy or have some other\nguarantee that it sets/strips this header appropriately.</p>\n<p>Note that the header needs to be in the format as used by <code class=\"docutils literal notranslate\"><span class=\"pre\">request.META</span></code> –\nall caps and likely starting with <code class=\"docutils literal notranslate\"><span class=\"pre\">HTTP_</span></code>. (Remember, Django automatically\nadds <code class=\"docutils literal notranslate\"><span class=\"pre\">'HTTP_'</span></code> to the start of x-header names before making the header\navailable in <code class=\"docutils literal notranslate\"><span class=\"pre\">request.META</span></code>.)</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</p>\n<p><strong>Modifying this setting can compromise your site’s security. Ensure you\nfully understand your setup before changing it.</strong></p>\n<p>Make sure ALL of the following are true before setting this (assuming the\nvalues from the example above):</p>\n<ul class=\"simple\">\n<li><p>Your Django app is behind a proxy.</p></li>\n<li><p>Your proxy strips the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Proto</span></code> header from all incoming\nrequests. In other words, if end users include that header in their\nrequests, the proxy will discard it.</p></li>\n<li><p>Your proxy sets the <code class=\"docutils literal notranslate\"><span class=\"pre\">X-Forwarded-Proto</span></code> header and sends it to Django,\nbut only for requests that originally come in via HTTPS.</p></li>\n</ul>\n<p>If any of those are not true, you should keep this setting set to <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>\nand find another way of determining HTTPS, perhaps via custom middleware.</p>\n</aside>\n</section>\n<section id=\"secure-redirect-exempt\">\n<span id=\"std-setting-SECURE_REDIRECT_EXEMPT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SECURE_REDIRECT_EXEMPT</span></code><a class=\"heading-anchor\" href=\"#secure-redirect-exempt\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SecurityMiddleware</span></code></a>\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/middleware/#ssl-redirect\"><span class=\"std std-ref\">redirects</span></a> all non-HTTPS requests to HTTPS (except for\nthose URLs matching a regular expression listed in\n<a class=\"reference internal\" href=\"#std-setting-SECURE_REDIRECT_EXEMPT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_REDIRECT_EXEMPT</span></code></a>).</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">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 para este cabeçalho</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/topics/email/#django.core.mail.send_mail\" title=\"django.core.mail.send_mail\"><code class=\"xref py py-meth docutils literal notranslate\"><span class=\"pre\">send_mail()</span></code></a>\ncome from; for that, see <a class=\"reference internal\" href=\"#std-setting-DEFAULT_FROM_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_FROM_EMAIL</span></code></a>.</p>\n</aside>\n</section>\n<section id=\"short-date-format\">\n<span id=\"std-setting-SHORT_DATE_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code><a class=\"heading-anchor\" href=\"#short-date-format\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>Veja também <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> e <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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-SHORT_DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SHORT_DATE_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"signing-backend\">\n<span id=\"std-setting-SIGNING_BACKEND\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SIGNING_BACKEND</span></code><a class=\"heading-anchor\" href=\"#signing-backend\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/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 para este cabeçalho</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<p>Veja também a <a class=\"reference internal\" href=\"/pt-br/2.1/ref/checks/\"><span class=\"doc\">O framework de verificação do sistema.</span></a> documentação.</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 para este cabeçalho</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=\"id7\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">BACKEND</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEMPLATES-BACKEND\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"id8\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">NAME</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEMPLATES-NAME\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Padrão: veja abaixo</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 para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> sets <code class=\"docutils literal notranslate\"><span class=\"pre\">'APP_DIRS':</span> <span class=\"pre\">True</span></code>.</p>\n</aside>\n</section>\n<section id=\"std-setting-TEMPLATES-OPTIONS\">\n<span id=\"id9\"></span><h4><code class=\"docutils literal notranslate\"><span class=\"pre\">OPTIONS</span></code><a class=\"heading-anchor\" href=\"#std-setting-TEMPLATES-OPTIONS\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/templates/#django.template.backends.django.DjangoTemplates\" title=\"django.template.backends.django.DjangoTemplates\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">DjangoTemplates</span></code></a> and\n<a class=\"reference internal\" href=\"/pt-br/2.1/topics/templates/#django.template.backends.jinja2.Jinja2\" title=\"django.template.backends.jinja2.Jinja2\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">Jinja2</span></code></a> for the options of the\nbuilt-in backends.</p>\n</section>\n</section>\n<section id=\"test-runner\">\n<span id=\"std-setting-TEST_RUNNER\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TEST_RUNNER</span></code><a class=\"heading-anchor\" href=\"#test-runner\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/testing/advanced/#other-testing-frameworks\"><span class=\"std std-ref\">Using different testing frameworks</span></a>.</p>\n</section>\n<section id=\"test-non-serialized-apps\">\n<span id=\"std-setting-TEST_NON_SERIALIZED_APPS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TEST_NON_SERIALIZED_APPS</span></code><a class=\"heading-anchor\" href=\"#test-non-serialized-apps\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/testing/overview/#test-case-serialized-rollback\"><span class=\"std std-ref\">serialize the contents of all apps</span></a>\nwhen it starts the test run so it can then reload from that copy before running\ntests that need it.</p>\n<p>This slows down the startup time of the test runner; if you have apps that\nyou know don’t need this feature, you can add their full names in here (e.g.\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.contenttypes'</span></code>) to exclude them from this serialization\nprocess.</p>\n</section>\n<section id=\"thousand-separator\">\n<span id=\"std-setting-THOUSAND_SEPARATOR\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">THOUSAND_SEPARATOR</span></code><a class=\"heading-anchor\" href=\"#thousand-separator\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"time-input-formats\">\n<span id=\"std-setting-TIME_INPUT_FORMATS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_INPUT_FORMATS</span></code><a class=\"heading-anchor\" href=\"#time-input-formats\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão:</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=\"(em Python v3.14)\"><span class=\"xref std std-ref\">datetime module syntax</span></a>, not the format strings from the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">date</span></code></a>\ntemplate filter.</p>\n<p>When <a class=\"reference internal\" href=\"#std-setting-USE_L10N\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code></a> is <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code>, the locale-dictated format has higher\nprecedence and will be applied instead.</p>\n<p>See also <a class=\"reference internal\" href=\"#std-setting-DATE_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_INPUT_FORMATS</span></code></a> and <a class=\"reference internal\" href=\"#std-setting-DATETIME_INPUT_FORMATS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_INPUT_FORMATS</span></code></a>.</p>\n</section>\n<section id=\"std-setting-TIME_ZONE\">\n<span id=\"id10\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code><a class=\"heading-anchor\" href=\"#std-setting-TIME_ZONE\"><span class=\"visually-hidden\">Link para este cabeçalho</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. See the <a class=\"reference external\" href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">list of\ntime zones</a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">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>On Unix environments (where <a class=\"reference external\" href=\"https://docs.python.org/3/library/time.html#time.tzset\" title=\"(em Python v3.14)\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">time.tzset()</span></code></a> is implemented), Django sets the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">os.environ['TZ']</span></code> variable to the time zone you specify in the\n<a class=\"reference internal\" href=\"#std-setting-TIME_ZONE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_ZONE</span></code></a> setting. Thus, all your views and models will\nautomatically operate in this time zone. However, Django won’t set the <code class=\"docutils literal notranslate\"><span class=\"pre\">TZ</span></code>\nenvironment variable if you’re using the manual configuration option as\ndescribed in <a class=\"reference internal\" href=\"/pt-br/2.1/topics/settings/#settings-without-django-settings-module\"><span class=\"std std-ref\">manually configuring settings</span></a>. If Django doesn’t set the <code class=\"docutils literal notranslate\"><span class=\"pre\">TZ</span></code>\nenvironment variable, it’s up to you to ensure your processes are running in\nthe correct environment.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">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-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 para este cabeçalho</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=\"/pt-br/2.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> includes <code class=\"docutils literal notranslate\"><span class=\"pre\">USE_I18N</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code> for convenience.</p>\n</aside>\n</section>\n<section id=\"use-l10n\">\n<span id=\"std-setting-USE_L10N\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_L10N</span></code><a class=\"heading-anchor\" href=\"#use-l10n\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> includes <code class=\"docutils literal notranslate\"><span class=\"pre\">USE_L10N</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code> for convenience.</p>\n</aside>\n</section>\n<section id=\"use-thousand-separator\">\n<span id=\"std-setting-USE_THOUSAND_SEPARATOR\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_THOUSAND_SEPARATOR</span></code><a class=\"heading-anchor\" href=\"#use-thousand-separator\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span> <span class=\"pre\">startproject</span></code></a> includes\n<code class=\"docutils literal notranslate\"><span class=\"pre\">USE_TZ</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code> for convenience.</p>\n</aside>\n</section>\n<section id=\"use-x-forwarded-host\">\n<span id=\"std-setting-USE_X_FORWARDED_HOST\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_HOST</span></code><a class=\"heading-anchor\" href=\"#use-x-forwarded-host\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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-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 para este cabeçalho</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=\"/pt-br/2.1/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a>) will use. The <a class=\"reference internal\" href=\"/pt-br/2.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a> management command will create a 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=\"/pt-br/2.1/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a> will be\nidentical to previous Django versions.</p>\n</section>\n<section id=\"year-month-format\">\n<span id=\"std-setting-YEAR_MONTH_FORMAT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">YEAR_MONTH_FORMAT</span></code><a class=\"heading-anchor\" href=\"#year-month-format\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/templates/builtins/#std-templatefilter-date\"><code class=\"xref std std-tfilter docutils literal notranslate\"><span class=\"pre\">allowed</span> <span class=\"pre\">date</span> <span class=\"pre\">format</span> <span class=\"pre\">strings</span></code></a>. See also\n<a class=\"reference internal\" href=\"#std-setting-DATE_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATE_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-DATETIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATETIME_FORMAT</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-TIME_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TIME_FORMAT</span></code></a>\nand <a class=\"reference internal\" href=\"#std-setting-MONTH_DAY_FORMAT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MONTH_DAY_FORMAT</span></code></a>.</p>\n</section>\n<section id=\"x-frame-options\">\n<span id=\"std-setting-X_FRAME_OPTIONS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">X_FRAME_OPTIONS</span></code><a class=\"heading-anchor\" href=\"#x-frame-options\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/middleware/#django.middleware.clickjacking.XFrameOptionsMiddleware\" title=\"django.middleware.clickjacking.XFrameOptionsMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">XFrameOptionsMiddleware</span></code></a>. See the\n<a class=\"reference internal\" href=\"/pt-br/2.1/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=\"#id14\" role=\"doc-backlink\">Autenticação</a><a class=\"headerlink\" href=\"#auth\" title=\"Link para este cabeçalho\">¶</a></h2>\n<p>Configurações para <a class=\"reference internal\" href=\"/pt-br/2.1/topics/auth/#module-django.contrib.auth\" title=\"django.contrib.auth: Django's authentication framework.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.auth</span></code></a>.</p>\n<section id=\"authentication-backends\">\n<span id=\"std-setting-AUTHENTICATION_BACKENDS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">AUTHENTICATION_BACKENDS</span></code><a class=\"heading-anchor\" href=\"#authentication-backends\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/auth/customizing/#authentication-backends\"><span class=\"std std-ref\">authentication backends documentation</span></a> for details.</p>\n</section>\n<section id=\"auth-user-model\">\n<span id=\"std-setting-AUTH_USER_MODEL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">AUTH_USER_MODEL</span></code><a class=\"heading-anchor\" href=\"#auth-user-model\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/topics/auth/customizing/#auth-custom-user\"><span class=\"std std-ref\">Substituindo um modelo de Usuário personalizado</span></a>.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</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=\"/pt-br/2.1/topics/auth/customizing/#auth-custom-user\"><span class=\"std std-ref\">Substituindo um modelo de Usuário personalizado</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/topics/auth/default/#django.contrib.auth.decorators.login_required\" title=\"django.contrib.auth.decorators.login_required\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">login_required()</span></code></a>\ndecorator, for example.</p>\n<p>This setting also accepts <a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/topics/auth/default/#django.contrib.auth.decorators.login_required\" title=\"django.contrib.auth.decorators.login_required\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">login_required()</span></code></a> decorator.</p>\n<p>This setting also accepts <a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</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 URL where requests are redirected after a user logs out using\n<a class=\"reference internal\" href=\"/pt-br/2.1/topics/auth/default/#django.contrib.auth.views.LogoutView\" title=\"django.contrib.auth.views.LogoutView\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">LogoutView</span></code></a> (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=\"/pt-br/2.1/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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">3</span></code></p>\n<p>The minimum number of days a password reset link is valid for. Depending on\nwhen the link is generated, it will be valid for up to a day longer.</p>\n<p>Used by the <a class=\"reference internal\" href=\"/pt-br/2.1/topics/auth/default/#django.contrib.auth.views.PasswordResetConfirmView\" title=\"django.contrib.auth.views.PasswordResetConfirmView\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">PasswordResetConfirmView</span></code></a>.</p>\n</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Veja <a class=\"reference internal\" href=\"/pt-br/2.1/topics/auth/passwords/#auth-password-storage\"><span class=\"std std-ref\">Como o Django armazena as senhas</span></a>.</p>\n<p>Padrão:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"p\">[</span>\n    <span class=\"s1\">&#39;django.contrib.auth.hashers.PBKDF2PasswordHasher&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.contrib.auth.hashers.Argon2PasswordHasher&#39;</span><span class=\"p\">,</span>\n    <span class=\"s1\">&#39;django.contrib.auth.hashers.BCryptSHA256PasswordHasher&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n</section>\n<section id=\"auth-password-validators\">\n<span id=\"std-setting-AUTH_PASSWORD_VALIDATORS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">AUTH_PASSWORD_VALIDATORS</span></code><a class=\"heading-anchor\" href=\"#auth-password-validators\"><span class=\"visually-hidden\">Link para este cabeçalho</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 validators that are used to check the strength of user’s passwords.\nSee <a class=\"reference internal\" href=\"/pt-br/2.1/topics/auth/passwords/#password-validation\"><span class=\"std std-ref\">Validação de senha</span></a> for more details. By default, no validation is\nperformed and all passwords are accepted.</p>\n</section>\n</section>\n<section id=\"messages\">\n<span id=\"settings-messages\"></span><h2><a class=\"toc-backref\" href=\"#id15\" role=\"doc-backlink\">Mensagens</a><a class=\"headerlink\" href=\"#messages\" title=\"Link para este cabeçalho\">¶</a></h2>\n<p>Configurações para <a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/messages/#module-django.contrib.messages\" title=\"django.contrib.messages: Provides cookie- and session-based temporary message storage.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.messages</span></code></a>.</p>\n<section id=\"message-level\">\n<span id=\"std-setting-MESSAGE_LEVEL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MESSAGE_LEVEL</span></code><a class=\"heading-anchor\" href=\"#message-level\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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=\"/pt-br/2.1/ref/contrib/messages/#message-level\"><span class=\"std std-ref\">message levels</span></a> for more details.</p>\n<aside class=\"admonition-important admonition\">\n<p class=\"admonition-title\">Importante</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=\"/pt-br/2.1/ref/contrib/messages/#message-level-constants\"><span class=\"std std-ref\">constants table</span></a>.</p>\n</aside>\n</section>\n<section id=\"message-storage\">\n<span id=\"std-setting-MESSAGE_STORAGE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MESSAGE_STORAGE</span></code><a class=\"heading-anchor\" href=\"#message-storage\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/contrib/messages/#message-storage-backends\"><span class=\"std std-ref\">message storage backends</span></a> for more details.</p>\n<p>The backends that use cookies –\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/messages/#django.contrib.messages.storage.cookie.CookieStorage\" title=\"django.contrib.messages.storage.cookie.CookieStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">CookieStorage</span></code></a> and\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/messages/#django.contrib.messages.storage.fallback.FallbackStorage\" title=\"django.contrib.messages.storage.fallback.FallbackStorage\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">FallbackStorage</span></code></a> –\nuse the value of <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_DOMAIN\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_DOMAIN</span></code></a>, <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SECURE</span></code></a>\nand <a class=\"reference internal\" href=\"#std-setting-SESSION_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_HTTPONLY</span></code></a> when setting their cookies.</p>\n</section>\n<section id=\"message-tags\">\n<span id=\"std-setting-MESSAGE_TAGS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">MESSAGE_TAGS</span></code><a class=\"heading-anchor\" href=\"#message-tags\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão:</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=\"/pt-br/2.1/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\">Importante</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=\"/pt-br/2.1/ref/contrib/messages/#message-level-constants\"><span class=\"std std-ref\">constants table</span></a>.</p>\n</aside>\n</section>\n</section>\n<section id=\"sessions\">\n<span id=\"settings-sessions\"></span><h2><a class=\"toc-backref\" href=\"#id16\" role=\"doc-backlink\">Sessões</a><a class=\"headerlink\" href=\"#sessions\" title=\"Link para este cabeçalho\">¶</a></h2>\n<p>Configurações para <a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/sessions/#module-django.contrib.sessions\" title=\"django.contrib.sessions: Provides session management for Django projects.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.sessions</span></code></a>.</p>\n<section id=\"session-cache-alias\">\n<span id=\"std-setting-SESSION_CACHE_ALIAS\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_CACHE_ALIAS</span></code><a class=\"heading-anchor\" href=\"#session-cache-alias\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">'default'</span></code></p>\n<p>If you’re using <a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/sessions/#cached-sessions-backend\"><span class=\"std std-ref\">cache-based session storage</span></a>,\nthis selects the cache to use.</p>\n</section>\n<section id=\"session-cookie-age\">\n<span id=\"std-setting-SESSION_COOKIE_AGE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_AGE</span></code><a class=\"heading-anchor\" href=\"#session-cookie-age\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <code class=\"docutils literal notranslate\"><span class=\"pre\">1209600</span></code> (2 semanas, em segundos)</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 para este cabeçalho</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> for cross-domain cookies, or use <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for a standard\ndomain cookie.</p>\n<p>Be cautious when updating this setting on a production site. If you update\nthis setting to enable cross-domain cookies on a site that previously used\nstandard domain cookies, existing user cookies 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=\"/pt-br/2.1/ref/contrib/messages/#module-django.contrib.messages\" title=\"django.contrib.messages: Provides cookie- and session-based temporary message storage.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.messages</span></code></a>.</p>\n</section>\n<section id=\"session-cookie-httponly\">\n<span id=\"std-setting-SESSION_COOKIE_HTTPONLY\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_HTTPONLY</span></code><a class=\"heading-anchor\" href=\"#session-cookie-httponly\"><span class=\"visually-hidden\">Link para este cabeçalho</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>This makes it less trivial for an attacker to escalate a cross-site scripting\nvulnerability into full hijacking of a user’s session. There aren’t many good\nreasons for turning this off. Your code shouldn’t read session cookies from\nJavaScript.</p>\n</section>\n<section id=\"session-cookie-name\">\n<span id=\"std-setting-SESSION_COOKIE_NAME\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_NAME</span></code><a class=\"heading-anchor\" href=\"#session-cookie-name\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão: <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 para este cabeçalho</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-samesite\">\n<span id=\"std-setting-SESSION_COOKIE_SAMESITE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SAMESITE</span></code><a class=\"heading-anchor\" href=\"#session-cookie-samesite\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<aside class=\"version-note version-added\" data-version=\"2.1\">\n<p class=\"version-note-title\">New in Django 2.1</p></aside>\n<p>Default: <code class=\"docutils literal notranslate\"><span class=\"pre\">'Lax'</span></code></p>\n<p>The value of the <a class=\"reference external\" href=\"https://www.owasp.org/index.php/SameSite\">SameSite</a> flag on the session cookie. This flag prevents the\ncookie from being sent in cross-site requests thus preventing CSRF attacks and\nmaking some methods of stealing session cookie impossible.</p>\n<p>Possible values for the setting are:</p>\n<ul>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'Strict'</span></code>: prevents the cookie from being sent by the browser to the\ntarget site in all cross-site browsing context, even when following a regular\nlink.</p>\n<p>For example, for a GitHub-like website this would mean that if a logged-in\nuser follows a link to a private GitHub project posted on a corporate\ndiscussion forum or email, GitHub will not receive the session cookie and the\nuser won’t be able to access the project. A bank website, however, most\nlikely doesn’t want to allow any transactional pages to be linked from\nexternal sites so the <code class=\"docutils literal notranslate\"><span class=\"pre\">'Strict'</span></code> flag would be appropriate.</p>\n</li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'Lax'</span></code> (default): provides a balance between security and usability for\nwebsites that want to maintain user’s logged-in session after the user\narrives from an external link.</p>\n<p>In the GitHub scenario, the session cookie would be allowed when following a\nregular link from an external website and be blocked in CSRF-prone request\nmethods (e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">POST</span></code>).</p>\n</li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>: disables the flag.</p></li>\n</ul>\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 para este cabeçalho</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>Leaving this setting off isn’t a good idea because an attacker could capture an\nunencrypted session cookie with a packet sniffer and use the cookie to hijack\nthe user’s session.</p>\n</section>\n<section id=\"session-engine\">\n<span id=\"std-setting-SESSION_ENGINE\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SESSION_ENGINE</span></code><a class=\"heading-anchor\" href=\"#session-engine\"><span class=\"visually-hidden\">Link para este cabeçalho</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>Veja <a class=\"reference internal\" href=\"/pt-br/2.1/topics/http/sessions/#configuring-sessions\"><span class=\"std std-ref\">Configuring the session engine</span></a> para mais detalhes</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 para este cabeçalho</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=\"/pt-br/2.1/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 para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</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=\"/pt-br/2.1/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=\"/pt-br/2.1/topics/http/sessions/#django.contrib.sessions.serializers.PickleSerializer\" title=\"django.contrib.sessions.serializers.PickleSerializer\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">PickleSerializer</span></code></a>.</p>\n</section>\n</section>\n<section id=\"sites\">\n<h2><a class=\"toc-backref\" href=\"#id17\" role=\"doc-backlink\">Sites</a><a class=\"headerlink\" href=\"#sites\" title=\"Link para este cabeçalho\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/sites/#module-django.contrib.sites\" title=\"django.contrib.sites: Lets you operate multiple websites from the same database and Django project\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.sites</span></code></a>.</p>\n<section id=\"site-id\">\n<span id=\"std-setting-SITE_ID\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">SITE_ID</span></code><a class=\"heading-anchor\" href=\"#site-id\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"#id18\" role=\"doc-backlink\">Arquivos Estáticos</a><a class=\"headerlink\" href=\"#static-files\" title=\"Link para este cabeçalho\">¶</a></h2>\n<p>Settings for <a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code></a>.</p>\n<section id=\"static-root\">\n<span id=\"std-setting-STATIC_ROOT\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code><a class=\"heading-anchor\" href=\"#static-root\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> will collect\nstatic files for deployment.</p>\n<p>Example: <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;/var/www/example.com/static/&quot;</span></code></p>\n<p>If the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/staticfiles/\"><span class=\"doc\">staticfiles</span></a> contrib app is enabled\n(as in the default project template), the <a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management\ncommand will collect static files into this directory. See the how-to on\n<a class=\"reference internal\" href=\"/pt-br/2.1/howto/static-files/\"><span class=\"doc\">managing static files</span></a> for more details about\nusage.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</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=\"/pt-br/2.1/ref/contrib/staticfiles/\"><span class=\"doc\">staticfiles</span></a>’s\n<a class=\"reference internal\" href=\"#std-setting-STATICFILES_FINDERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">finders</span></code></a>, which by default, are\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'static/'</span></code> app sub-directories and any directories you include in\n<a class=\"reference internal\" href=\"#std-setting-STATICFILES_DIRS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_DIRS</span></code></a>).</p>\n</aside>\n</section>\n<section id=\"static-url\">\n<span id=\"std-setting-STATIC_URL\"></span><h3><code class=\"docutils literal notranslate\"><span class=\"pre\">STATIC_URL</span></code><a class=\"heading-anchor\" href=\"#static-url\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"/pt-br/2.1/topics/forms/media/#form-asset-paths\"><span class=\"std std-ref\">asset definitions</span></a> (the <code class=\"docutils literal notranslate\"><span class=\"pre\">Media</span></code> class) and the\n<a class=\"reference internal\" href=\"/pt-br/2.1/ref/contrib/staticfiles/\"><span class=\"doc\">staticfiles app</span></a>.</p>\n<p>It must end in a slash if set to a non-empty value.</p>\n<p>You may need to <a class=\"reference internal\" href=\"/pt-br/2.1/howto/static-files/#serving-static-files-in-development\"><span class=\"std std-ref\">configure these files to be served in development</span></a> and will definitely need to do so\n<a class=\"reference internal\" href=\"/pt-br/2.1/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 para este cabeçalho</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=\"/pt-br/2.1/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=\"/pt-br/2.1/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 para este cabeçalho</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=\"/pt-br/2.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command would collect the “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 para este cabeçalho</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=\"/pt-br/2.1/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command.</p>\n<p>A ready-to-use instance of the storage backend defined in this setting\ncan be found at <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles.storage.staticfiles_storage</span></code>.</p>\n<p>For an example, see <a class=\"reference internal\" href=\"/pt-br/2.1/howto/static-files/deployment/#staticfiles-from-cdn\"><span class=\"std std-ref\">Servindo arquivos estáticos de um serviço em nuvem ou 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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Padrão:</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=\"#id19\" role=\"doc-backlink\">Core Settings Topical Index</a><a class=\"headerlink\" href=\"#core-settings-topical-index\" title=\"Link para este cabeçalho\">¶</a></h2>\n<section id=\"cache\">\n<h3>Cache<a class=\"heading-anchor\" href=\"#cache\"><span class=\"visually-hidden\">Link para este cabeçalho</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>Banco de dados<a class=\"heading-anchor\" href=\"#database\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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 para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-ADMINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_CHARSET\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_CHARSET</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_FROM_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_FROM_EMAIL</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_BACKEND\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_BACKEND</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_FILE_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_FILE_PATH</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST_PASSWORD\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_PASSWORD</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_HOST_USER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_HOST_USER</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_PORT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_PORT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_SSL_CERTFILE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_SSL_CERTFILE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_SSL_KEYFILE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_SSL_KEYFILE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_SUBJECT_PREFIX\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_SUBJECT_PREFIX</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_TIMEOUT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_TIMEOUT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_LOCALTIME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_LOCALTIME</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-EMAIL_USE_TLS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_USE_TLS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-MANAGERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SERVER_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SERVER_EMAIL</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"error-reporting\">\n<h3>Relatório de erro<a class=\"heading-anchor\" href=\"#error-reporting\"><span class=\"visually-hidden\">Link para este cabeçalho</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>Envio de arquivos<a class=\"heading-anchor\" href=\"#file-uploads\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"forms\">\n<h3>Formulários<a class=\"heading-anchor\" href=\"#forms\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-FORM_RENDERER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">FORM_RENDERER</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"globalization-i18n-l10n\">\n<h3>Globalização (<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 para este cabeçalho</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 para este cabeçalho</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>Segurança</p>\n<ul>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_BROWSER_XSS_FILTER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_BROWSER_XSS_FILTER</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_CONTENT_TYPE_NOSNIFF\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_CONTENT_TYPE_NOSNIFF</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_INCLUDE_SUBDOMAINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_INCLUDE_SUBDOMAINS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_PRELOAD\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_PRELOAD</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_HSTS_SECONDS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_PROXY_SSL_HEADER\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_PROXY_SSL_HEADER</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_REDIRECT_EXEMPT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_REDIRECT_EXEMPT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_SSL_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_SSL_HOST</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECURE_SSL_REDIRECT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECURE_SSL_REDIRECT</span></code></a></p></li>\n</ul>\n</li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SIGNING_BACKEND\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SIGNING_BACKEND</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-USE_X_FORWARDED_HOST\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_HOST</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-USE_X_FORWARDED_PORT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">USE_X_FORWARDED_PORT</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-WSGI_APPLICATION\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">WSGI_APPLICATION</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"id11\">\n<h3>Logging<a class=\"heading-anchor\" href=\"#id11\"><span class=\"visually-hidden\">Link para este cabeçalho</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 para este cabeçalho</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>Segurança<a class=\"heading-anchor\" href=\"#security\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>Proteção contra “Cross Site Request Forgery”</p>\n<ul>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_DOMAIN\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_DOMAIN</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_NAME</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_PATH</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_SAMESITE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SAMESITE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SECURE</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_FAILURE_VIEW\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_FAILURE_VIEW</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_HEADER_NAME\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_HEADER_NAME</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_TRUSTED_ORIGINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_TRUSTED_ORIGINS</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-CSRF_USE_SESSIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_USE_SESSIONS</span></code></a></p></li>\n</ul>\n</li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SECRET_KEY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-X_FRAME_OPTIONS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">X_FRAME_OPTIONS</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"serialization\">\n<h3>Serialização<a class=\"heading-anchor\" href=\"#serialization\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#std-setting-DEFAULT_CHARSET\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_CHARSET</span></code></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#std-setting-SERIALIZATION_MODULES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SERIALIZATION_MODULES</span></code></a></p></li>\n</ul>\n</section>\n<section id=\"id12\">\n<h3>Templates<a class=\"heading-anchor\" href=\"#id12\"><span class=\"visually-hidden\">Link para este cabeçalho</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>ensaio<a class=\"heading-anchor\" href=\"#testing\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>Banco de dados: <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 para este cabeçalho</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_SAMESITE","anchor":"csrf-cookie-samesite","children":[]},{"title":"CSRF_COOKIE_SECURE","anchor":"csrf-cookie-secure","children":[]},{"title":"CSRF_USE_SESSIONS","anchor":"csrf-use-sessions","children":[]},{"title":"CSRF_FAILURE_VIEW","anchor":"csrf-failure-view","children":[]},{"title":"CSRF_HEADER_NAME","anchor":"csrf-header-name","children":[]},{"title":"CSRF_TRUSTED_ORIGINS","anchor":"csrf-trusted-origins","children":[]},{"title":"DATABASES","anchor":"databases","children":[{"title":"ATOMIC_REQUESTS","anchor":"atomic-requests","children":[]},{"title":"AUTOCOMMIT","anchor":"autocommit","children":[]},{"title":"ENGINE","anchor":"engine","children":[]},{"title":"HOST","anchor":"host","children":[]},{"title":"NAME","anchor":"name","children":[]},{"title":"CONN_MAX_AGE","anchor":"conn-max-age","children":[]},{"title":"OPTIONS","anchor":"std-setting-OPTIONS","children":[]},{"title":"PASSWORD","anchor":"password","children":[]},{"title":"PORT","anchor":"port","children":[]},{"title":"TIME_ZONE","anchor":"time-zone","children":[]},{"title":"DISABLE_SERVER_SIDE_CURSORS","anchor":"disable-server-side-cursors","children":[]},{"title":"USER","anchor":"user","children":[]},{"title":"TEST","anchor":"test","children":[{"title":"CHARSET","anchor":"charset","children":[]},{"title":"COLLATION","anchor":"collation","children":[]},{"title":"DEPENDENCIES","anchor":"dependencies","children":[]},{"title":"MIRROR","anchor":"mirror","children":[]},{"title":"NAME","anchor":"std-setting-TEST_NAME","children":[]},{"title":"SERIALIZE","anchor":"serialize","children":[]},{"title":"TEMPLATE","anchor":"template","children":[]},{"title":"CREATE_DB","anchor":"create-db","children":[]},{"title":"CREATE_USER","anchor":"create-user","children":[]},{"title":"USER","anchor":"std-setting-TEST_USER","children":[]},{"title":"PASSWORD","anchor":"std-setting-TEST_PASSWD","children":[]},{"title":"TBLSPACE","anchor":"tblspace","children":[]},{"title":"TBLSPACE_TMP","anchor":"tblspace-tmp","children":[]},{"title":"DATAFILE","anchor":"datafile","children":[]},{"title":"DATAFILE_TMP","anchor":"datafile-tmp","children":[]},{"title":"DATAFILE_MAXSIZE","anchor":"datafile-maxsize","children":[]},{"title":"DATAFILE_TMP_MAXSIZE","anchor":"datafile-tmp-maxsize","children":[]},{"title":"DATAFILE_SIZE","anchor":"datafile-size","children":[]},{"title":"DATAFILE_TMP_SIZE","anchor":"datafile-tmp-size","children":[]},{"title":"DATAFILE_EXTSIZE","anchor":"datafile-extsize","children":[]},{"title":"DATAFILE_TMP_EXTSIZE","anchor":"datafile-tmp-extsize","children":[]}]}]},{"title":"DATA_UPLOAD_MAX_MEMORY_SIZE","anchor":"data-upload-max-memory-size","children":[]},{"title":"DATA_UPLOAD_MAX_NUMBER_FIELDS","anchor":"data-upload-max-number-fields","children":[]},{"title":"DATABASE_ROUTERS","anchor":"database-routers","children":[]},{"title":"DATE_FORMAT","anchor":"date-format","children":[]},{"title":"DATE_INPUT_FORMATS","anchor":"date-input-formats","children":[]},{"title":"DATETIME_FORMAT","anchor":"datetime-format","children":[]},{"title":"DATETIME_INPUT_FORMATS","anchor":"datetime-input-formats","children":[]},{"title":"DEBUG","anchor":"debug","children":[]},{"title":"DEBUG_PROPAGATE_EXCEPTIONS","anchor":"debug-propagate-exceptions","children":[]},{"title":"DECIMAL_SEPARATOR","anchor":"decimal-separator","children":[]},{"title":"DEFAULT_CHARSET","anchor":"default-charset","children":[]},{"title":"DEFAULT_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_LOCALTIME","anchor":"email-use-localtime","children":[]},{"title":"EMAIL_USE_TLS","anchor":"email-use-tls","children":[]},{"title":"EMAIL_USE_SSL","anchor":"email-use-ssl","children":[]},{"title":"EMAIL_SSL_CERTFILE","anchor":"email-ssl-certfile","children":[]},{"title":"EMAIL_SSL_KEYFILE","anchor":"email-ssl-keyfile","children":[]},{"title":"EMAIL_TIMEOUT","anchor":"email-timeout","children":[]},{"title":"FILE_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":"FORM_RENDERER","anchor":"form-renderer","children":[]},{"title":"FORMAT_MODULE_PATH","anchor":"format-module-path","children":[]},{"title":"IGNORABLE_404_URLS","anchor":"ignorable-404-urls","children":[]},{"title":"INSTALLED_APPS","anchor":"installed-apps","children":[]},{"title":"INTERNAL_IPS","anchor":"internal-ips","children":[]},{"title":"LANGUAGE_CODE","anchor":"language-code","children":[]},{"title":"LANGUAGE_COOKIE_AGE","anchor":"language-cookie-age","children":[]},{"title":"LANGUAGE_COOKIE_DOMAIN","anchor":"language-cookie-domain","children":[]},{"title":"LANGUAGE_COOKIE_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":"MIGRATION_MODULES","anchor":"migration-modules","children":[]},{"title":"MONTH_DAY_FORMAT","anchor":"month-day-format","children":[]},{"title":"NUMBER_GROUPING","anchor":"number-grouping","children":[]},{"title":"PREPEND_WWW","anchor":"prepend-www","children":[]},{"title":"ROOT_URLCONF","anchor":"root-urlconf","children":[]},{"title":"SECRET_KEY","anchor":"secret-key","children":[]},{"title":"SECURE_BROWSER_XSS_FILTER","anchor":"secure-browser-xss-filter","children":[]},{"title":"SECURE_CONTENT_TYPE_NOSNIFF","anchor":"secure-content-type-nosniff","children":[]},{"title":"SECURE_HSTS_INCLUDE_SUBDOMAINS","anchor":"secure-hsts-include-subdomains","children":[]},{"title":"SECURE_HSTS_PRELOAD","anchor":"secure-hsts-preload","children":[]},{"title":"SECURE_HSTS_SECONDS","anchor":"secure-hsts-seconds","children":[]},{"title":"SECURE_PROXY_SSL_HEADER","anchor":"secure-proxy-ssl-header","children":[]},{"title":"SECURE_REDIRECT_EXEMPT","anchor":"secure-redirect-exempt","children":[]},{"title":"SECURE_SSL_HOST","anchor":"secure-ssl-host","children":[]},{"title":"SECURE_SSL_REDIRECT","anchor":"secure-ssl-redirect","children":[]},{"title":"SERIALIZATION_MODULES","anchor":"serialization-modules","children":[]},{"title":"SERVER_EMAIL","anchor":"server-email","children":[]},{"title":"SHORT_DATE_FORMAT","anchor":"short-date-format","children":[]},{"title":"SHORT_DATETIME_FORMAT","anchor":"short-datetime-format","children":[]},{"title":"SIGNING_BACKEND","anchor":"signing-backend","children":[]},{"title":"SILENCED_SYSTEM_CHECKS","anchor":"silenced-system-checks","children":[]},{"title":"TEMPLATES","anchor":"templates","children":[{"title":"BACKEND","anchor":"std-setting-TEMPLATES-BACKEND","children":[]},{"title":"NAME","anchor":"std-setting-TEMPLATES-NAME","children":[]},{"title":"DIRS","anchor":"dirs","children":[]},{"title":"APP_DIRS","anchor":"app-dirs","children":[]},{"title":"OPTIONS","anchor":"std-setting-TEMPLATES-OPTIONS","children":[]}]},{"title":"TEST_RUNNER","anchor":"test-runner","children":[]},{"title":"TEST_NON_SERIALIZED_APPS","anchor":"test-non-serialized-apps","children":[]},{"title":"THOUSAND_SEPARATOR","anchor":"thousand-separator","children":[]},{"title":"TIME_FORMAT","anchor":"time-format","children":[]},{"title":"TIME_INPUT_FORMATS","anchor":"time-input-formats","children":[]},{"title":"TIME_ZONE","anchor":"std-setting-TIME_ZONE","children":[]},{"title":"USE_I18N","anchor":"use-i18n","children":[]},{"title":"USE_L10N","anchor":"use-l10n","children":[]},{"title":"USE_THOUSAND_SEPARATOR","anchor":"use-thousand-separator","children":[]},{"title":"USE_TZ","anchor":"use-tz","children":[]},{"title":"USE_X_FORWARDED_HOST","anchor":"use-x-forwarded-host","children":[]},{"title":"USE_X_FORWARDED_PORT","anchor":"use-x-forwarded-port","children":[]},{"title":"WSGI_APPLICATION","anchor":"wsgi-application","children":[]},{"title":"YEAR_MONTH_FORMAT","anchor":"year-month-format","children":[]},{"title":"X_FRAME_OPTIONS","anchor":"x-frame-options","children":[]}]},{"title":"Autenticação","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":"Mensagens","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":"Sessões","anchor":"sessions","children":[{"title":"SESSION_CACHE_ALIAS","anchor":"session-cache-alias","children":[]},{"title":"SESSION_COOKIE_AGE","anchor":"session-cookie-age","children":[]},{"title":"SESSION_COOKIE_DOMAIN","anchor":"session-cookie-domain","children":[]},{"title":"SESSION_COOKIE_HTTPONLY","anchor":"session-cookie-httponly","children":[]},{"title":"SESSION_COOKIE_NAME","anchor":"session-cookie-name","children":[]},{"title":"SESSION_COOKIE_PATH","anchor":"session-cookie-path","children":[]},{"title":"SESSION_COOKIE_SAMESITE","anchor":"session-cookie-samesite","children":[]},{"title":"SESSION_COOKIE_SECURE","anchor":"session-cookie-secure","children":[]},{"title":"SESSION_ENGINE","anchor":"session-engine","children":[]},{"title":"SESSION_EXPIRE_AT_BROWSER_CLOSE","anchor":"session-expire-at-browser-close","children":[]},{"title":"SESSION_FILE_PATH","anchor":"session-file-path","children":[]},{"title":"SESSION_SAVE_EVERY_REQUEST","anchor":"session-save-every-request","children":[]},{"title":"SESSION_SERIALIZER","anchor":"session-serializer","children":[]}]},{"title":"Sites","anchor":"sites","children":[{"title":"SITE_ID","anchor":"site-id","children":[]}]},{"title":"Arquivos Estáticos","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":"Banco de dados","anchor":"database","children":[]},{"title":"Debugging","anchor":"debugging","children":[]},{"title":"Email","anchor":"email","children":[]},{"title":"Relatório de erro","anchor":"error-reporting","children":[]},{"title":"Envio de arquivos","anchor":"file-uploads","children":[]},{"title":"Formulários","anchor":"forms","children":[]},{"title":"Globalização (i18n/l10n)","anchor":"globalization-i18n-l10n","children":[]},{"title":"HTTP","anchor":"http","children":[]},{"title":"Logging","anchor":"id11","children":[]},{"title":"Models","anchor":"models","children":[]},{"title":"Segurança","anchor":"security","children":[]},{"title":"Serialização","anchor":"serialization","children":[]},{"title":"Templates","anchor":"id12","children":[]},{"title":"ensaio","anchor":"testing","children":[]},{"title":"URLs","anchor":"urls","children":[]}]}],"breadcrumbs":[{"docname":"ref/index","title":"Referência da API","url":"/pt-br/2.1/ref/"}],"prev":{"docname":"ref/schema-editor","title":"SchemaEditor","url":"/pt-br/2.1/ref/schema-editor/"},"next":{"docname":"ref/signals","title":"Signals","url":"/pt-br/2.1/ref/signals/"},"formats":{"html":"/pt-br/2.1/ref/settings/","markdown":"/pt-br/2.1/ref/settings.md","json":"/pt-br/2.1/ref/settings.json"},"source":"https://github.com/django/django/blob/stable/2.1.x/docs/ref/settings.txt","official":"https://docs.djangoproject.com/pt-br/2.1/ref/settings/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}