Go back to pre-login URL after loging in

Simply append the current URL (sans querystring) as a ?next= parameter
to the login URL. This will always take us back to the original page
where we were pre-login.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-11-26 17:03:24 +01:00
parent 620e4e1b6e
commit d3c6e2a042

View File

@ -65,7 +65,8 @@
{% trans %}Verify your email!{% endtrans %}</a>
{% endif %}
{% else %}
<a href="{{ request.urlgen('mediagoblin.auth.login') }}">
<a href="{{ request.urlgen('mediagoblin.auth.login') }}?next={{
request.base_url|urlencode }}">
{% trans %}Log in{% endtrans %}</a>
{% endif %}
</div>