diff options
author | Weitian LI <liweitianux@gmail.com> | 2014-04-29 23:05:12 +0800 |
---|---|---|
committer | Weitian LI <liweitianux@gmail.com> | 2014-04-29 23:05:12 +0800 |
commit | e4c677d83684d317e1e4d3c15904940f162944d8 (patch) | |
tree | 9fd557d79aaeaa995be9f3da86e1a18b99c4f4e5 /django_skaschool | |
parent | 1c80526e14fbf32cca6ec5cc14c36046e09a4342 (diff) | |
download | django-skaschool-e4c677d83684d317e1e4d3c15904940f162944d8.tar.bz2 |
updated 'wsgi.py' to provide 'check_password' handler for mod_wsgi to work with apache2 user authentication
Diffstat (limited to 'django_skaschool')
-rw-r--r-- | django_skaschool/wsgi.py | 13 |
1 files 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() + |