{"title":"How to deploy Django","version":"5.2","locale":"es","docname":"howto/deployment/index","url":"/es/5.2/howto/deployment/","canonical":"https://djangodocs.dev/es/5.2/howto/deployment/","summary":"Django is full of shortcuts to make web developers” lives easier, but all those tools are of no use if you can’t easily deploy your sites. Since Django’s inception,…","html":"<h1>How to deploy Django<a class=\"heading-anchor\" href=\"#how-to-deploy-django\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Django is full of shortcuts to make web developers” lives easier, but all\nthose tools are of no use if you can’t easily deploy your sites. Since Django’s\ninception, ease of deployment has been a major goal.</p>\n<p>There are many options for deploying your Django application, based on your\narchitecture or your particular business needs, but that discussion is outside\nthe scope of what Django can give you as guidance.</p>\n<p>Django, being a web framework, needs a web server in order to operate. And\nsince most web servers don’t natively speak Python, we need an interface to\nmake that communication happen. The <a class=\"reference internal\" href=\"/es/5.2/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a> command starts a\nlightweight development server, which is not suitable for production.</p>\n<p>Django currently supports two interfaces: WSGI and ASGI.</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://wsgi.readthedocs.io/en/latest/\">WSGI</a> is the main Python standard for communicating between web servers and\napplications, but it only supports synchronous code.</p></li>\n<li><p><a class=\"reference external\" href=\"https://asgi.readthedocs.io/en/latest/\">ASGI</a> is the new, asynchronous-friendly standard that will allow your\nDjango site to use asynchronous Python features, and asynchronous Django\nfeatures as they are developed.</p></li>\n</ul>\n<p>You should also consider how you will handle <a class=\"reference internal\" href=\"/es/5.2/howto/static-files/deployment/\"><span class=\"doc\">static files</span></a> for your application, and how to handle\n<a class=\"reference internal\" href=\"/es/5.2/howto/error-reporting/\"><span class=\"doc\">error reporting</span></a>.</p>\n<p>Finally, before you deploy your application to production, you should run\nthrough our <a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/\"><span class=\"doc\">deployment checklist</span></a> to ensure that your\nconfigurations are suitable.</p>\n<div class=\"toctree-wrapper compound\">\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/wsgi/\">How to deploy with WSGI</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/wsgi/gunicorn/\">How to use Django with Gunicorn</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/wsgi/uwsgi/\">How to use Django with uWSGI</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/wsgi/modwsgi/\">Como usar Django con Apache y <code class=\"docutils literal notranslate\"><span class=\"pre\">mod_wsgi</span></code></a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/wsgi/apache-auth/\">How to authenticate against Django’s user database from Apache</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/wsgi/#the-application-object\">The <code class=\"docutils literal notranslate\"><span class=\"pre\">application</span></code> object</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/wsgi/#configuring-the-settings-module\">Configuring the settings module</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/wsgi/#applying-wsgi-middleware\">Applying WSGI middleware</a></li>\n</ul>\n</li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/asgi/\">How to deploy with ASGI</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/asgi/daphne/\">How to use Django with Daphne</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/asgi/hypercorn/\">How to use Django with Hypercorn</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/asgi/uvicorn/\">How to use Django with Uvicorn</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/asgi/#the-application-object\">The <code class=\"docutils literal notranslate\"><span class=\"pre\">application</span></code> object</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/asgi/#configuring-the-settings-module\">Configuring the settings module</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/asgi/#applying-asgi-middleware\">Applying ASGI middleware</a></li>\n</ul>\n</li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/\">Deployment checklist</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/#run-manage-py-check-deploy\">Ejecute <code class=\"docutils literal notranslate\"><span class=\"pre\">manage.py</span> <span class=\"pre\">check</span> <span class=\"pre\">--deploy</span></code></a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/#switch-away-from-manage-py-runserver\">Switch away from <code class=\"docutils literal notranslate\"><span class=\"pre\">manage.py</span> <span class=\"pre\">runserver</span></code></a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/#critical-settings\">Critical settings</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/#environment-specific-settings\">Environment-specific settings</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/#https\">HTTPS</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/#performance-optimizations\">Performance optimizations</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"/es/5.2/howto/deployment/checklist/#error-reporting\">Error reporting</a></li>\n</ul>\n</li>\n</ul>\n</div>","rootId":"how-to-deploy-django","toc":[],"breadcrumbs":[{"docname":"howto/index","title":"How-to guides","url":"/es/5.2/howto/"}],"prev":{"docname":"howto/windows","title":"How to install Django on Windows","url":"/es/5.2/howto/windows/"},"next":{"docname":"howto/deployment/wsgi/index","title":"How to deploy with WSGI","url":"/es/5.2/howto/deployment/wsgi/"},"formats":{"html":"/es/5.2/howto/deployment/","markdown":"/es/5.2/howto/deployment.md","json":"/es/5.2/howto/deployment.json"},"source":"https://github.com/django/django/blob/stable/5.2.x/docs/howto/deployment/index.txt","official":"https://docs.djangoproject.com/es/5.2/howto/deployment/","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","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}