mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
don't import django before we really need it. Should fix issue #166 .
This commit is contained in:
parent
0c05de4d2b
commit
75fec00896
@ -10,10 +10,11 @@ import traceback
|
|||||||
from gunicorn.config import Config
|
from gunicorn.config import Config
|
||||||
from gunicorn.app.base import Application
|
from gunicorn.app.base import Application
|
||||||
|
|
||||||
|
ENVIRONMENT_VARIABLE = 'DJANGO_SETTINGS_MODULE'
|
||||||
|
|
||||||
class DjangoApplication(Application):
|
class DjangoApplication(Application):
|
||||||
|
|
||||||
def init(self, parser, opts, args):
|
def init(self, parser, opts, args):
|
||||||
from django.conf import ENVIRONMENT_VARIABLE
|
|
||||||
self.settings_modname = None
|
self.settings_modname = None
|
||||||
self.project_path = os.getcwd()
|
self.project_path = os.getcwd()
|
||||||
if args:
|
if args:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user