1. ====================
    
  2. How to deploy Django
    
  3. ====================
    
  4. 
    
  5. Django is full of shortcuts to make web developers' lives easier, but all
    
  6. those tools are of no use if you can't easily deploy your sites. Since Django's
    
  7. inception, ease of deployment has been a major goal.
    
  8. 
    
  9. There are many options for deploying your Django application, based on your
    
  10. architecture or your particular business needs, but that discussion is outside
    
  11. the scope of what Django can give you as guidance.
    
  12. 
    
  13. Django, being a web framework, needs a web server in order to operate. And
    
  14. since most web servers don't natively speak Python, we need an interface to
    
  15. make that communication happen.
    
  16. 
    
  17. Django currently supports two interfaces: WSGI and ASGI.
    
  18. 
    
  19. * `WSGI`_ is the main Python standard for communicating between web servers and
    
  20.   applications, but it only supports synchronous code.
    
  21. 
    
  22. * `ASGI`_ is the new, asynchronous-friendly standard that will allow your
    
  23.   Django site to use asynchronous Python features, and asynchronous Django
    
  24.   features as they are developed.
    
  25. 
    
  26. You should also consider how you will handle :doc:`static files
    
  27. </howto/static-files/deployment>` for your application, and how to handle
    
  28. :doc:`error reporting</howto/error-reporting>`.
    
  29. 
    
  30. Finally, before you deploy your application to production, you should run
    
  31. through our :doc:`deployment checklist<checklist>` to ensure that your
    
  32. configurations are suitable.
    
  33. 
    
  34. .. _WSGI: https://wsgi.readthedocs.io/en/latest/
    
  35. .. _ASGI: https://asgi.readthedocs.io/en/latest/
    
  36. 
    
  37. .. toctree::
    
  38.    :maxdepth: 2
    
  39. 
    
  40.    wsgi/index
    
  41.    asgi/index
    
  42.    checklist