From 97e2814c3fe84a7243d4c3309255345f2e6a6ca7 Mon Sep 17 00:00:00 2001 From: tkupek Date: Sat, 19 Mar 2016 11:15:48 +0100 Subject: [PATCH] fix for running elearning on apache --- tkupek_elearning/wsgi.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tkupek_elearning/wsgi.py b/tkupek_elearning/wsgi.py index 692dba2..0b5400c 100644 --- a/tkupek_elearning/wsgi.py +++ b/tkupek_elearning/wsgi.py @@ -8,9 +8,14 @@ https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os - +import sys from django.core.wsgi import get_wsgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tkupek_elearning.settings") +base = os.path.dirname(os.path.dirname(__file__)) +base_parent = os.path.dirname(base) +sys.path.append(base) +sys.path.append(base_parent) + +os.environ["DJANGO_SETTINGS_MODULE"] = "tkupek_elearning.settings" application = get_wsgi_application()