Fix django path finding for bin/ scripts
This commit is contained in:
parent
f10c9433c0
commit
c0a65be9d0
|
@ -11,7 +11,8 @@ import django
|
||||||
import ipaddress
|
import ipaddress
|
||||||
|
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dnmgmt.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dnmgmt.settings")
|
||||||
sys.path.append("..")
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
sys.path.append(BASE_DIR)
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@ import logging
|
||||||
import select
|
import select
|
||||||
|
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dnmgmt.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dnmgmt.settings")
|
||||||
sys.path.append("..")
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
sys.path.append(BASE_DIR)
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
from whoisdb.helpers import findInDatabase, getWhoisObjectFields
|
from whoisdb.helpers import findInDatabase, getWhoisObjectFields
|
||||||
|
|
Loading…
Reference in New Issue