{"title":"Deployment checklist","version":"5.0","locale":"es","docname":"howto/deployment/checklist","url":"/es/5.0/howto/deployment/checklist/","canonical":"https://djangodocs.dev/es/5.0/howto/deployment/checklist/","summary":"The internet is a hostile environment. Before deploying your Django project, you should take some time to review your settings, with security, performance, and…","html":"<h1>Deployment checklist<a class=\"heading-anchor\" href=\"#deployment-checklist\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>The internet is a hostile environment. Before deploying your Django project,\nyou should take some time to review your settings, with security, performance,\nand operations in mind.</p>\n<p>Django includes many <a class=\"reference internal\" href=\"/es/5.0/topics/security/\"><span class=\"doc\">security features</span></a>. Some are\nbuilt-in and always enabled. Others are optional because they aren’t always\nappropriate, or because they’re inconvenient for development. For example,\nforcing HTTPS may not be suitable for all websites, and it’s impractical for\nlocal development.</p>\n<p>Performance optimizations are another category of trade-offs with convenience.\nFor instance, caching is useful in production, less so for local development.\nError reporting needs are also widely different.</p>\n<p>The following checklist includes settings that:</p>\n<ul class=\"simple\">\n<li><p>must be set properly for Django to provide the expected level of security;</p></li>\n<li><p>are expected to be different in each environment;</p></li>\n<li><p>habilitar funciones de seguridad opcionales;</p></li>\n<li><p>habilitar optimizaciones de rendimiento;</p></li>\n<li><p>provide error reporting.</p></li>\n</ul>\n<p>Many of these settings are sensitive and should be treated as confidential. If\nyou’re releasing the source code for your project, a common practice is to\npublish suitable settings for development, and to use a private settings\nmodule for production.</p>\n<section id=\"run-manage-py-check-deploy\">\n<h2>Ejecute <code class=\"docutils literal notranslate\"><span class=\"pre\">manage.py</span> <span class=\"pre\">check</span> <span class=\"pre\">--deploy</span></code><a class=\"heading-anchor\" href=\"#run-manage-py-check-deploy\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Some of the checks described below can be automated using the <a class=\"reference internal\" href=\"/es/5.0/ref/django-admin/#cmdoption-check-deploy\"><code class=\"xref std std-option docutils literal notranslate\"><span class=\"pre\">check</span>\n<span class=\"pre\">--deploy</span></code></a> option. Be sure to run it against your production settings file as\ndescribed in the option’s documentation.</p>\n</section>\n<section id=\"critical-settings\">\n<h2>Critical settings<a class=\"heading-anchor\" href=\"#critical-settings\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"secret-key\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-SECRET_KEY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code></a><a class=\"heading-anchor\" href=\"#secret-key\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p><strong>The secret key must be a large random value and it must be kept secret.</strong></p>\n<p>Asegúrese de que la clave utilizada en producción no se use en ningún otro lugar y evite enviarla al control de código fuente. Esto reduce la cantidad de vectores desde los cuales un atacante puede adquirir la clave.</p>\n<p>En lugar de codificar la clave secreta en su módulo de configuración, considere cargarla desde una variable de entorno:</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\">import</span><span class=\"w\"> </span><span class=\"nn\">os</span>\n\n<span class=\"n\">SECRET_KEY</span> <span class=\"o\">=</span> <span class=\"n\">os</span><span class=\"o\">.</span><span class=\"n\">environ</span><span class=\"p\">[</span><span class=\"s2\">&quot;SECRET_KEY&quot;</span><span class=\"p\">]</span>\n</code></pre></div>\n<p>or from a 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=\"k\">with</span> <span class=\"nb\">open</span><span class=\"p\">(</span><span class=\"s2\">&quot;/etc/secret_key.txt&quot;</span><span class=\"p\">)</span> <span class=\"k\">as</span> <span class=\"n\">f</span><span class=\"p\">:</span>\n    <span class=\"n\">SECRET_KEY</span> <span class=\"o\">=</span> <span class=\"n\">f</span><span class=\"o\">.</span><span class=\"n\">read</span><span class=\"p\">()</span><span class=\"o\">.</span><span class=\"n\">strip</span><span class=\"p\">()</span>\n</code></pre></div>\n<p>If rotating secret keys, you may use <a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-SECRET_KEY_FALLBACKS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECRET_KEY_FALLBACKS</span></code></a>:</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\">import</span><span class=\"w\"> </span><span class=\"nn\">os</span>\n\n<span class=\"n\">SECRET_KEY</span> <span class=\"o\">=</span> <span class=\"n\">os</span><span class=\"o\">.</span><span class=\"n\">environ</span><span class=\"p\">[</span><span class=\"s2\">&quot;CURRENT_SECRET_KEY&quot;</span><span class=\"p\">]</span>\n<span class=\"n\">SECRET_KEY_FALLBACKS</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"n\">os</span><span class=\"o\">.</span><span class=\"n\">environ</span><span class=\"p\">[</span><span class=\"s2\">&quot;OLD_SECRET_KEY&quot;</span><span class=\"p\">],</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p>Ensure that old secret keys are removed from <code class=\"docutils literal notranslate\"><span class=\"pre\">SECRET_KEY_FALLBACKS</span></code> in a\ntimely manner.</p>\n</section>\n<section id=\"debug\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a><a class=\"heading-anchor\" href=\"#debug\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p><strong>You must never enable debug in production.</strong></p>\n<p>You’re certainly developing your project with <a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code></a>,\nsince this enables handy features like full tracebacks in your browser.</p>\n<p>For a production environment, though, this is a really bad idea, because it\nleaks lots of information about your project: excerpts of your source code,\nlocal variables, settings, libraries used, etc.</p>\n</section>\n</section>\n<section id=\"environment-specific-settings\">\n<h2>Environment-specific settings<a class=\"heading-anchor\" href=\"#environment-specific-settings\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"allowed-hosts\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-ALLOWED_HOSTS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code></a><a class=\"heading-anchor\" href=\"#allowed-hosts\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>When <a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span> <span class=\"pre\">=</span> <span class=\"pre\">False</span></code></a>, Django doesn’t work at all without a\nsuitable value for <a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-ALLOWED_HOSTS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ALLOWED_HOSTS</span></code></a>.</p>\n<p>This setting is required to protect your site against some CSRF attacks. If\nyou use a wildcard, you must perform your own validation of the <code class=\"docutils literal notranslate\"><span class=\"pre\">Host</span></code> HTTP\nheader, or otherwise ensure that you aren’t vulnerable to this category of\nattacks.</p>\n<p>You should also configure the web server that sits in front of Django to\nvalidate the host. It should respond with a static error page or ignore\nrequests for incorrect hosts instead of forwarding the request to Django. This\nway you’ll avoid spurious errors in your Django logs (or emails if you have\nerror reporting configured that way). For example, on nginx you might set up a\ndefault server to return «444 No Response» on an unrecognized host:</p>\n<div class=\"code-block\" data-language=\"nginx\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Nginx</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=\"Nginx code\"><code><span class=\"k\">server</span><span class=\"w\"> </span><span class=\"p\">{</span>\n<span class=\"w\">    </span><span class=\"kn\">listen</span><span class=\"w\"> </span><span class=\"mi\">80</span><span class=\"w\"> </span><span class=\"s\">default_server</span><span class=\"p\">;</span>\n<span class=\"w\">    </span><span class=\"kn\">return</span><span class=\"w\"> </span><span class=\"mi\">444</span><span class=\"p\">;</span>\n<span class=\"p\">}</span>\n</code></pre></div>\n</section>\n<section id=\"caches\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-CACHES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CACHES</span></code></a><a class=\"heading-anchor\" href=\"#caches\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>If you’re using a cache, connection parameters may be different in development\nand in production. Django defaults to per-process <a class=\"reference internal\" href=\"/es/5.0/topics/cache/#local-memory-caching\"><span class=\"std std-ref\">local-memory caching</span></a> which may not be desirable.</p>\n<p>Cache servers often have weak authentication. Make sure they only accept\nconnections from your application servers.</p>\n</section>\n<section id=\"databases\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-DATABASES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DATABASES</span></code></a><a class=\"heading-anchor\" href=\"#databases\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Database connection parameters are probably different in development and in\nproduction.</p>\n<p>Database passwords are very sensitive. You should protect them exactly like\n<a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-SECRET_KEY\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SECRET_KEY</span></code></a>.</p>\n<p>For maximum security, make sure database servers only accept connections from\nyour application servers.</p>\n<p>If you haven’t set up backups for your database, do it right now!</p>\n</section>\n<section id=\"email-backend-and-related-settings\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-EMAIL_BACKEND\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">EMAIL_BACKEND</span></code></a> and related settings<a class=\"heading-anchor\" href=\"#email-backend-and-related-settings\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>If your site sends emails, these values need to be set correctly.</p>\n<p>By default, Django sends email from <a class=\"reference external\" href=\"mailto:webmaster&#37;&#52;&#48;localhost\">webmaster<span>&#64;</span>localhost</a> and <a class=\"reference external\" href=\"mailto:root&#37;&#52;&#48;localhost\">root<span>&#64;</span>localhost</a>.\nHowever, some mail providers reject email from these addresses. To use\ndifferent sender addresses, modify the <a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-DEFAULT_FROM_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEFAULT_FROM_EMAIL</span></code></a> and\n<a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-SERVER_EMAIL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SERVER_EMAIL</span></code></a> settings.</p>\n</section>\n<section id=\"static-root-and-static-url\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a> and <a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-STATIC_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_URL</span></code></a><a class=\"heading-anchor\" href=\"#static-root-and-static-url\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Static files are automatically served by the development server. In\nproduction, you must define a <a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a> directory where\n<a class=\"reference internal\" href=\"/es/5.0/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> will copy them.</p>\n<p>See <a class=\"reference internal\" href=\"/es/5.0/howto/static-files/\"><span class=\"doc\">How to manage static files (e.g. images, JavaScript, CSS)</span></a> for more information.</p>\n</section>\n<section id=\"media-root-and-media-url\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#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=\"/es/5.0/ref/settings/#std-setting-MEDIA_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_URL</span></code></a><a class=\"heading-anchor\" href=\"#media-root-and-media-url\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Media files are uploaded by your users. They’re untrusted! Make sure your web\nserver never attempts to interpret them. For instance, if a user uploads a\n<code class=\"docutils literal notranslate\"><span class=\"pre\">.php</span></code> file, the web server shouldn’t execute it.</p>\n<p>Now is a good time to check your backup strategy for these files.</p>\n</section>\n</section>\n<section id=\"https\">\n<h2>HTTPS<a class=\"heading-anchor\" href=\"#https\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Any website which allows users to log in should enforce site-wide HTTPS to\navoid transmitting access tokens in clear. In Django, access tokens include\nthe login/password, the session cookie, and password reset tokens. (You can’t\ndo much to protect password reset tokens if you’re sending them by email.)</p>\n<p>Protecting sensitive areas such as the user account or the admin isn’t\nsufficient, because the same session cookie is used for HTTP and HTTPS. Your\nweb server must redirect all HTTP traffic to HTTPS, and only transmit HTTPS\nrequests to Django.</p>\n<p>Once you’ve set up HTTPS, enable the following settings.</p>\n<section id=\"csrf-cookie-secure\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-CSRF_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CSRF_COOKIE_SECURE</span></code></a><a class=\"heading-anchor\" href=\"#csrf-cookie-secure\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> to avoid transmitting the CSRF cookie over HTTP\naccidentally.</p>\n</section>\n<section id=\"session-cookie-secure\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-SESSION_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">SESSION_COOKIE_SECURE</span></code></a><a class=\"heading-anchor\" href=\"#session-cookie-secure\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Set this to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> to avoid transmitting the session cookie over HTTP\naccidentally.</p>\n</section>\n</section>\n<section id=\"performance-optimizations\">\n<h2>Performance optimizations<a class=\"heading-anchor\" href=\"#performance-optimizations\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Setting <a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span> <span class=\"pre\">=</span> <span class=\"pre\">False</span></code></a> disables several features that are\nonly useful in development. In addition, you can tune the following settings.</p>\n<section id=\"sessions\">\n<h3>Sesiones<a class=\"heading-anchor\" href=\"#sessions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Consider using <a class=\"reference internal\" href=\"/es/5.0/topics/http/sessions/#cached-sessions-backend\"><span class=\"std std-ref\">cached sessions</span></a> to improve\nperformance.</p>\n<p>If using database-backed sessions, regularly <a class=\"reference internal\" href=\"/es/5.0/topics/http/sessions/#clearing-the-session-store\"><span class=\"std std-ref\">clear old sessions</span></a> to avoid storing unnecessary data.</p>\n</section>\n<section id=\"conn-max-age\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-CONN_MAX_AGE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">CONN_MAX_AGE</span></code></a><a class=\"heading-anchor\" href=\"#conn-max-age\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Enabling <a class=\"reference internal\" href=\"/es/5.0/ref/databases/#persistent-database-connections\"><span class=\"std std-ref\">persistent database connections</span></a> can result in a nice speed-up when\nconnecting to the database accounts for a significant part of the request\nprocessing time.</p>\n<p>This helps a lot on virtualized hosts with limited network performance.</p>\n</section>\n<section id=\"templates\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">TEMPLATES</span></code></a><a class=\"heading-anchor\" href=\"#templates\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Enabling the cached template loader often improves performance drastically, as\nit avoids compiling each template every time it needs to be rendered. When\n<a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span> <span class=\"pre\">=</span> <span class=\"pre\">False</span></code></a>, the cached template loader is enabled\nautomatically. See <a class=\"reference internal\" href=\"/es/5.0/ref/templates/api/#django.template.loaders.cached.Loader\" title=\"django.template.loaders.cached.Loader\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.template.loaders.cached.Loader</span></code></a> for more\ninformation.</p>\n</section>\n</section>\n<section id=\"error-reporting\">\n<h2>Error reporting<a class=\"heading-anchor\" href=\"#error-reporting\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>By the time you push your code to production, it’s hopefully robust, but you\ncan’t rule out unexpected errors. Thankfully, Django can capture errors and\nnotify you accordingly.</p>\n<section id=\"logging\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-LOGGING\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">LOGGING</span></code></a><a class=\"heading-anchor\" href=\"#logging\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Review your logging configuration before putting your website in production,\nand check that it works as expected as soon as you have received some traffic.</p>\n<p>See <a class=\"reference internal\" href=\"/es/5.0/topics/logging/\"><span class=\"doc\">Logging</span></a> for details on logging.</p>\n</section>\n<section id=\"admins-and-managers\">\n<h3><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#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=\"/es/5.0/ref/settings/#std-setting-MANAGERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code></a><a class=\"heading-anchor\" href=\"#admins-and-managers\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-ADMINS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code></a> will be notified of 500 errors by email.</p>\n<p><a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-MANAGERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MANAGERS</span></code></a> will be notified of 404 errors.\n<a class=\"reference internal\" href=\"/es/5.0/ref/settings/#std-setting-IGNORABLE_404_URLS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">IGNORABLE_404_URLS</span></code></a> can help filter out spurious reports.</p>\n<p>See <a class=\"reference internal\" href=\"/es/5.0/howto/error-reporting/\"><span class=\"doc\">How to manage error reporting</span></a> for details on error reporting by email.</p>\n<aside class=\"admonition-error-reporting-by-email-doesn-t-scale-very-well admonition\">\n<p class=\"admonition-title\">Error reporting by email doesn’t scale very well</p>\n<p>Consider using an error monitoring system such as <a class=\"reference external\" href=\"https://docs.sentry.io/\">Sentry</a> before your\ninbox is flooded by reports. Sentry can also aggregate logs.</p>\n</aside>\n</section>\n<section id=\"customize-the-default-error-views\">\n<h3>Customize the default error views<a class=\"heading-anchor\" href=\"#customize-the-default-error-views\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Django includes default views and templates for several HTTP error codes. You\nmay want to override the default templates by creating the following templates\nin your root template directory: <code class=\"docutils literal notranslate\"><span class=\"pre\">404.html</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">500.html</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">403.html</span></code>, and\n<code class=\"docutils literal notranslate\"><span class=\"pre\">400.html</span></code>. The <a class=\"reference internal\" href=\"/es/5.0/ref/views/#error-views\"><span class=\"std std-ref\">default error views</span></a> that use these\ntemplates should suffice for 99% of web applications, but you can\n<a class=\"reference internal\" href=\"/es/5.0/topics/http/views/#customizing-error-views\"><span class=\"std std-ref\">customize them</span></a> as well.</p>\n</section>\n</section>","rootId":"deployment-checklist","toc":[{"title":"Ejecute manage.py check --deploy","anchor":"run-manage-py-check-deploy","children":[]},{"title":"Critical settings","anchor":"critical-settings","children":[{"title":"SECRET_KEY","anchor":"secret-key","children":[]},{"title":"DEBUG","anchor":"debug","children":[]}]},{"title":"Environment-specific settings","anchor":"environment-specific-settings","children":[{"title":"ALLOWED_HOSTS","anchor":"allowed-hosts","children":[]},{"title":"CACHES","anchor":"caches","children":[]},{"title":"DATABASES","anchor":"databases","children":[]},{"title":"EMAIL_BACKEND and related settings","anchor":"email-backend-and-related-settings","children":[]},{"title":"STATIC_ROOT and STATIC_URL","anchor":"static-root-and-static-url","children":[]},{"title":"MEDIA_ROOT and MEDIA_URL","anchor":"media-root-and-media-url","children":[]}]},{"title":"HTTPS","anchor":"https","children":[{"title":"CSRF_COOKIE_SECURE","anchor":"csrf-cookie-secure","children":[]},{"title":"SESSION_COOKIE_SECURE","anchor":"session-cookie-secure","children":[]}]},{"title":"Performance optimizations","anchor":"performance-optimizations","children":[{"title":"Sesiones","anchor":"sessions","children":[]},{"title":"CONN_MAX_AGE","anchor":"conn-max-age","children":[]},{"title":"TEMPLATES","anchor":"templates","children":[]}]},{"title":"Error reporting","anchor":"error-reporting","children":[{"title":"LOGGING","anchor":"logging","children":[]},{"title":"ADMINS and MANAGERS","anchor":"admins-and-managers","children":[]},{"title":"Customize the default error views","anchor":"customize-the-default-error-views","children":[]}]}],"breadcrumbs":[{"docname":"howto/index","title":"«How-to» guides","url":"/es/5.0/howto/"},{"docname":"howto/deployment/index","title":"How to deploy Django","url":"/es/5.0/howto/deployment/"}],"prev":{"docname":"howto/deployment/asgi/uvicorn","title":"How to use Django with Uvicorn","url":"/es/5.0/howto/deployment/asgi/uvicorn/"},"next":{"docname":"howto/upgrade-version","title":"How to upgrade Django to a newer version","url":"/es/5.0/howto/upgrade-version/"},"formats":{"html":"/es/5.0/howto/deployment/checklist/","markdown":"/es/5.0/howto/deployment/checklist.md","json":"/es/5.0/howto/deployment/checklist.json"},"source":"https://github.com/django/django/blob/stable/5.0.x/docs/howto/deployment/checklist.txt","official":"https://docs.djangoproject.com/es/5.0/howto/deployment/checklist/","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","it","pt-br","ko","es","el","pl"]}