{% extends "site_base.html" %}

{% load i18n %}

{% block content %}
{% if form.errors %}
<p>{% trans "Your username and password didn't match. Please try again." %}</p>
{% endif %}
<h3>{% trans "Log in" %}</h3>

<form method="post" action=".">
<table>
<tr>
    <td>{{ form.username.label_tag }}</td>
    <td>{{ form.username }}</td>
</tr>
<tr>
    <td>{{ form.password.label_tag }}</td>
    <td>{{ form.password }}</td>
</tr>
</table>

<input type="submit" value="login" />
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% else %}
<input type="hidden" name="next" value="/" />
{% endif %}
</form>
{% endblock %}


{% extends "site_base.html" %}

{% load i18n %}

{% block content %}
{% if form.errors %}
<p>{% trans "Your username and password didn't match. Please try again." %}</p>
{% endif %}
<h3>{% trans "Log in" %}</h3>

<form method="post" action=".">
<table>
<tr>
    <td>{{ form.username.label_tag }}</td>
    <td>{{ form.username }}</td>
</tr>
<tr>
    <td>{{ form.password.label_tag }}</td>
    <td>{{ form.password }}</td>
</tr>
</table>

<input type="submit" value="login" />
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% endif %}
</form>
{% endblock %}


Use LOGIN_REDIRECT_URL if no other URL is given
Use LOGIN_REDIRECT_URL if no other URL is given

Django's login view uses settings.LOGIN_REDIRECT_URL by default,
so there is no need to specify the 'next' parameter.

No behavior is changed, but it is now possible to enter a custom
redirect URL in the setings.

https://bugzilla.gnome.org/show_bug.cgi?id=605183
