From ca033e91bf5e6c22369447a0f1c7fdd4e497b736 Mon Sep 17 00:00:00 2001 From: eliott Date: Wed, 9 Apr 2008 22:42:56 -0700 Subject: Added/changed full site login middleware. --- main/sitelogin.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 main/sitelogin.py (limited to 'main/sitelogin.py') diff --git a/main/sitelogin.py b/main/sitelogin.py deleted file mode 100644 index 53721095..00000000 --- a/main/sitelogin.py +++ /dev/null @@ -1,15 +0,0 @@ -from django.contrib.auth.views import logout_then_login, login -from django.conf import settings - -class SiteLogin: - def __init__(self): - self.login_path = settings.LOGIN_URL - def process_request(self, request): - if request.user.is_anonymous() and request.path != self.login_path: - if request.POST: - return login(request) - else: - return HttpResponseRedirect('%s?next=%s' % (self.login_path, request.path)) - -# vim: set ts=4 sw=4 et: - -- cgit v1.2.3-54-g00ecf