Fix some issues caused by changes made over the last year

This commit is contained in:
David Taylor
2017-05-10 17:51:55 +01:00
parent 7ac9eef7a2
commit e573088c5e
5 changed files with 12 additions and 27 deletions

View File

@@ -30,7 +30,7 @@ class Index(generic.TemplateView):
def login(request, **kwargs):
if request.user.is_authenticated():
next = request.REQUEST.get('next', '/')
next = request.GET.get('next', '/')
return HttpResponseRedirect(next)
else:
from django.contrib.auth.views import login
@@ -44,9 +44,8 @@ def login(request, **kwargs):
# check for it before logging the user in
@csrf_exempt
def login_embed(request, **kwargs):
print("Running LOGIN")
if request.user.is_authenticated():
next = request.REQUEST.get('next', '/')
next = request.GET.get('next', '/')
return HttpResponseRedirect(next)
else:
from django.contrib.auth.views import login