Djangoをデプロイするには¶
Django にある非常に多くのショートカットはWeb開発者を楽にしてくれますが、サイトをかんたんにデプロイできなければ、これらのツールのどれも役に立ちません。 当初より Django は、デプロイのしやすさを大きな目標としてきました。
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 は Web フレームワークなので、動作させるには Web サーバが必要です。そして、ほとんどの Web サーバはネイティブでは Python を使用しないので、通信を実現するためのインターフェイスが必要です。
Djangoは現在、WSGIとASGIの2つのインターフェースをサポートしています。
- `WSGI`_はウェブサーバーとアプリケーション間で通信するためのPythonの主要な規格です。ただし、同期的なコードしかサポートしていません。
- ASGI は、Django サイトで非同期の Python 機能と非同期の Django 機能を使えるようにするための、新しい非同期フレンドリーな標準です。
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.