diff --git a/bin/import-data b/bin/import-data index 5eced17..5146b31 100755 --- a/bin/import-data +++ b/bin/import-data @@ -11,7 +11,8 @@ import django import ipaddress 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() diff --git a/bin/whoisd b/bin/whoisd index 7f9f65b..30b1a5d 100755 --- a/bin/whoisd +++ b/bin/whoisd @@ -10,7 +10,8 @@ import logging import select 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() from whoisdb.helpers import findInDatabase, getWhoisObjectFields