# Django 4.2.9.dev20231204082947 - dokumentacja

# Jak wdrażać Django

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, ease of deployment has been a major goal.

There are many options for deploying your Django application, based on your architecture or your particular business needs, but that discussion is outside the scope of what Django can give you as guidance.

Django, being a web framework, needs a web server in order to operate. And since most web servers don’t natively speak Python, we need an interface to make that communication happen.

Django wspiera aktualnie dwa interfejsy: WSGI i ASGI.

- WSGI is the main Python standard for communicating between web servers and applications, but it only supports synchronous code.
- ASGI is the new, asynchronous-friendly standard that will allow your Django site to use asynchronous Python features, and asynchronous Django features as they are developed.

You should also consider how you will handle static files for your application, and how to handle error reporting.

Finally, before you deploy your application to production, you should run through our deployment checklist to ensure that your configurations are suitable.

- Jak wdrażać z WSGI
  - Jak używać Django z Gunicornem
  - Jak używać Django z uWSGI
  - Jak używać Django z Apache i `mod_wsgi`
  - How to authenticate against Django’s user database from Apache
  - The `application` object
  - Konfigurowanie modułu ustawień
  - Dołączanie WSGI middleware
- Jak wdrażać z ASGI
  - Jak używać Django z Daphne
  - Jak używać Django z Hypercorn
  - Jak używać Django z Uvicorn
  - The `application` object
  - Konfigurowanie modułu ustawień
  - Applying ASGI middleware
- Wdrożeniowa lista kontrolna
  - Wykonaj `manage.py check --deploy`
  - Ustawienia krytyczne
  - Environment-specific settings
  - HTTPS
  - Optymalizacje wydajności
  - Zgłaszanie błędów