From e4c677d83684d317e1e4d3c15904940f162944d8 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Tue, 29 Apr 2014 23:05:12 +0800 Subject: updated 'wsgi.py' to provide 'check_password' handler for mod_wsgi to work with apache2 user authentication --- django_skaschool/wsgi.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/django_skaschool/wsgi.py b/django_skaschool/wsgi.py index bda56d1..9556936 100644 --- a/django_skaschool/wsgi.py +++ b/django_skaschool/wsgi.py @@ -11,7 +11,16 @@ import os #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_skaschool.settings") # use settings_production + +#from django.core.wsgi import get_wsgi_application +#application = get_wsgi_application() + os.environ["DJANGO_SETTINGS_MODULE"] = "django_skaschool.settings_production" -from django.core.wsgi import get_wsgi_application -application = get_wsgi_application() +# handler for mod_wsgi to work with apache2 user authentication +# ref: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/apache-auth/ +from django.contrib.auth.handlers.modwsgi import check_password + +from django.core.handlers.wsgi import WSGIHandler +application = WSGIHandler() + -- cgit v1.2.2