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:
parent
5145fba180
commit
e3ec6c34bc
2
builder
2
builder
@ -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
|
||||
|
2
injector
2
injector
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user