mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-02-08 12:54:23 +00:00
py-i2phosts-builder: use config for django setup
This commit is contained in:
parent
e64139d729
commit
6bfc7d7fb3
@ -21,7 +21,10 @@ if 'include' in config:
|
||||
|
||||
# django setup
|
||||
DJANGO_SETTINGS_MODULE = 'settings'
|
||||
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
|
||||
if 'DJANGO_PROJECT_PATH' in config:
|
||||
DJANGO_PROJECT_PATH = config['DJANGO_PROJECT_PATH']
|
||||
else:
|
||||
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
|
||||
sys.path.insert(1, DJANGO_PROJECT_PATH)
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
|
||||
from web.postkey.models import i2phost
|
||||
|
Loading…
x
Reference in New Issue
Block a user