mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
only looks for settings.py after we set the command line options
This commit is contained in:
parent
f071e7d4e1
commit
593051a43d
@ -173,6 +173,8 @@ def run():
|
||||
main(__usage__, get_app)
|
||||
|
||||
def run_django():
|
||||
|
||||
def get_app(parser, opts, args):
|
||||
import django.core.handlers.wsgi
|
||||
|
||||
PROJECT_PATH = os.getcwd()
|
||||
@ -188,8 +190,6 @@ def run_django():
|
||||
# set environ
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = '%s.settings' % PROJECT_NAME
|
||||
|
||||
|
||||
def get_app(parser, opts, args):
|
||||
# django wsgi app
|
||||
return django.core.handlers.wsgi.WSGIHandler()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user