Add Khoj Django app package to sys path to load Django module via pip install

This commit is contained in:
Debanjum Singh Solanky 2023-11-20 14:55:00 -08:00
parent 4e98acbca7
commit d61b0dd55c

View file

@ -25,6 +25,7 @@ from django.core.asgi import get_asgi_application
from django.core.management import call_command
# Initialize Django
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
django.setup()