Commit 4184d9e5 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

fix "None" next value in local login form

parent 8435507e
......@@ -39,7 +39,7 @@ from django.contrib import messages
from django.utils.translation import ugettext as _
from django.views.decorators.csrf import csrf_exempt
from astakos.im.util import prepare_response
from astakos.im.util import prepare_response, get_query
from astakos.im.views import requires_anonymous
from astakos.im.models import AstakosUser
from astakos.im.forms import LoginForm
......@@ -59,7 +59,7 @@ def login(request, on_failure='im/login.html'):
"""
was_limited = getattr(request, 'limited', False)
form = LoginForm(data=request.POST, was_limited=was_limited, request=request)
next = request.POST.get('next')
next = get_query(request).get('next', '')
if not form.is_valid():
return render_to_response(on_failure,
{'login_form':form,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment