diff --git a/apps/workerslocation/commands/radiusip.py b/apps/workerslocation/commands/radiusip.py index cfc89c9..c29bc8f 100644 --- a/apps/workerslocation/commands/radiusip.py +++ b/apps/workerslocation/commands/radiusip.py @@ -4,6 +4,7 @@ import os import socket import struct import subprocess +import sys import time import django @@ -266,6 +267,10 @@ async def main(): if __name__ == "__main__": + project_root = os.path.abspath( + os.path.join(os.path.dirname(__file__), '../../../')) + sys.path.append(project_root) + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mfssogr.settings") django.setup()