benoitc/gunicorn — Issue #275: use python module path for SETTINGS_PATH instead of filesystem path
Author: ptone
Created: 2011-10-14 19:31:28+00:00
State: open

the default for gunicorn_django is to assume a "settings.py" in the CWD

This is problematic for a number of reason:

* most tools that interact with Django settings take a python module dotted path location from the python path (myproj.settings)
* the convention is to assume that the project package (which contains settings.py) should be on the python path, and so settings would not be directly importable

The convenience of autosetting the DJANGO_SETTINGS_MODULE env variable that is done by manage.py should be invoked via gunicorn's run_gunicorn management command.

There are still the issues around validating models at process startup, but gunicorn_django could become a thinner wrapper around gunicorn vanilla, and use the wsgi entrypoint which will ensure the settings module env has been setup.