1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-01-22 12:34:17 +00:00

Redefine DJANGO_PROJECT_PATH in scripts

Assume that wep-part are located in <scriptdir>/web. Later we should use
a config variable for it. In production environment scripts will be
located in /usr/bin/
This commit is contained in:
Hidden Z 2010-10-14 17:44:50 +00:00
parent 5145fba180
commit e3ec6c34bc
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import sys
# django setup
DJANGO_SETTINGS_MODULE = 'settings'
DJANGO_PROJECT_PATH = 'web'
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

View File

@ -6,7 +6,7 @@ import argparse
# django setup
DJANGO_SETTINGS_MODULE = 'settings'
DJANGO_PROJECT_PATH = 'web'
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