Run Django development server with Gunicorn.
Project description
Run Django development server with Gunicorn.
Quickstart
Install django-gunicorn:
pip install djgunicorn
Then add it to your INSTALLED_APPS. You will get a new command gunserver (please forgive my little pun-loving self). It runs like Django’s development server, but the HTTP handling is backed by Gunicorn.
Features
You can find available options with:
python manage.py help gunserver
Most options work as the built-in runserver command (in django.contrib.staticfiles). Exceptions:
The verbosity and no-color settings are not passed to Gunicorn. They still affect messages emitted by the command itself, however.
The nothreading option does not do anything.
Todo
Unit tests and CI.
Check how low we can support Django and Gunicorn versions.
Support for additional Gunicorn configs that may be useful. SSL seems to be a common need.
Is it possible to conditionally replace the runserver command? By installing an alternative app config, for example?
Output redirection. Currently we always use stderr, but we should respect Command.stdout and Command.stderr.
The startup message is not printed when reloading. It is possible to hook this with Gunicorn server hooks (through a config file), but the problem is how we can pass the correct information into it.
Interesting Links
History
0.2.0 (2016-04-12)
Gunicorn invocation is re-implemented with subprocess to handle reloading gracefully. (benoitc/gunicorn#935)
0.1.1 (2016-04-11)
Lazy-load WSGI handler in Gunicorn application to avoid race conditions.
0.1.0 (2016-04-11)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file djgunicorn-0.2.0.tar.gz
.
File metadata
- Download URL: djgunicorn-0.2.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da1d7efb7bc1f392efa44b31aef5b84467029d3d6101fb89e37483d6152f8f1 |
|
MD5 | 756154563cea428c3fe656b0c69c19d6 |
|
BLAKE2b-256 | a2b6feab022ea14781a6347be34185224833a6509e7a04588d9504cf108f6cea |