1
0
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:
Hidden Z 2010-10-30 18:28:50 +00:00
parent e64139d729
commit 6bfc7d7fb3

View File

@ -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