From 6bfc7d7fb3c3f168cdfba0a2a52b8fd5c707ec77 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Sat, 30 Oct 2010 18:28:50 +0000 Subject: [PATCH] py-i2phosts-builder: use config for django setup --- py-i2phosts-builder | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py-i2phosts-builder b/py-i2phosts-builder index 04f970d..b1a7d33 100755 --- a/py-i2phosts-builder +++ b/py-i2phosts-builder @@ -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