Opened 12 years ago
Closed 12 years ago
#20029 closed Bug (invalid)
Django 1.5 / gunicorn 0.17.2 won't start
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.5 |
Severity: | Normal | Keywords: | django, gunicorn, connection |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Starting with Django 1.5
gunicorn_django --settings="project.settings" --pythonpath="."
Produces the following in the logfile:
Traceback (most recent call last): File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 485, in spawn_worker worker.init_process() File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 100, in init_process self.wsgi = self.app.wsgi() File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 103, in wsgi self.callable = self.load() File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/app/djangoapp.py", line 101, in load return mod.make_wsgi_application() File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/app/django_wsgi.py", line 36, in make_wsgi_application if get_validation_errors(s): File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/core/management/validation.py", line 28, in get_validation_errors from django.db import models, connection File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/db/__init__.py", line 11, in <module> if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES: File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 52, in __getattr__ self._setup(name) File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 47, in _setup self._wrapped = Settings(settings_module) File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init__ raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e)) ImportError: Could not import settings 'project.settings' (Is it on sys.path?): cannot import name connection
The way I read documentation for 1.5 is, that connection
is deprectated.
Note:
See TracTickets
for help on using tickets.
Please read TicketClosingReasons/UseSupportChannels
connection
isn't deprecated: https://docs.djangoproject.com/en/1.5/internals/deprecation/However,
gunicorn_django
is: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/gunicorn/