fix redirects in login links
This commit is contained in:
parent
ccd2cf1b99
commit
0a6e2797c4
2 changed files with 3 additions and 3 deletions
|
@ -9,9 +9,9 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="login_logout">
|
<li class="login_logout">
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
<a href="{% url 'editor.logout' %}?redirect={{ request.path }}">{% trans 'Log out' %}</a>
|
<a href="{% url 'editor.logout' %}?r={{ request.path }}">{% trans 'Log out' %}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url 'editor.login' %}?redirect={{ request.path }}">{% trans 'Log in' %}</a>
|
<a href="{% url 'editor.login' %}?r={{ request.path }}">{% trans 'Log in' %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -63,7 +63,7 @@ def changeset_detail(request, pk):
|
||||||
elif request.POST.get('propose') == '1':
|
elif request.POST.get('propose') == '1':
|
||||||
if not request.user.is_authenticated:
|
if not request.user.is_authenticated:
|
||||||
messages.info(request, _('You need to log in to propose changes.'))
|
messages.info(request, _('You need to log in to propose changes.'))
|
||||||
return redirect(reverse('editor.login')+'?redirect='+request.path)
|
return redirect(reverse('editor.login')+'?r='+request.path)
|
||||||
|
|
||||||
with changeset.lock_to_edit() as changeset:
|
with changeset.lock_to_edit() as changeset:
|
||||||
if changeset.can_propose(request):
|
if changeset.can_propose(request):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue