mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
some people put their settings in a module like settings/__init__.py .
this change allows it.
This commit is contained in:
parent
dc5fa6d8ee
commit
f4098aa20d
@ -199,13 +199,13 @@ def run_django():
|
|||||||
|
|
||||||
if args:
|
if args:
|
||||||
settings_path = os.path.abspath(os.path.normpath(args[0]))
|
settings_path = os.path.abspath(os.path.normpath(args[0]))
|
||||||
if not os.path.isfile(settings_path):
|
if not os.path.exists(settings_path):
|
||||||
settings_notfound(settings_path)
|
settings_notfound(settings_path)
|
||||||
else:
|
else:
|
||||||
project_path = os.path.dirname(settings_path)
|
project_path = os.path.dirname(settings_path)
|
||||||
else:
|
else:
|
||||||
settings_path = os.path.join(project_path, "settings.py")
|
settings_path = os.path.join(project_path, "settings.py")
|
||||||
if not os.path.isfile(settings_path):
|
if not os.path.exists(settings_path):
|
||||||
settings_notfound(settings_path)
|
settings_notfound(settings_path)
|
||||||
|
|
||||||
project_name = os.path.split(project_path)[-1]
|
project_name = os.path.split(project_path)[-1]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user