0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-24 10:58:52 +01:00

Revert "Create login_wrapper view"

This reverts commit 4f914fdc57.
This commit is contained in:
Karl Hobley 2014-02-14 12:47:34 +00:00
parent c420b17f2b
commit 9023432f5a

View File

@ -2,7 +2,6 @@ from django.conf import settings
from django.shortcuts import render, redirect
from django.contrib import messages
from django.contrib.auth.forms import SetPasswordForm
from django.contrib.auth.views import login
def account(request):
@ -32,11 +31,3 @@ def change_password(request):
'form': form,
'can_change_password': can_change_password,
})
# Wrap login view to prevent logged in users accessing the page
def login_wrapper(request, **kwargs):
if request.user.is_authenticated():
return redirect(settings.LOGIN_REDIRECT_URL)
else:
return login(request, **kwargs)