. The form is rendered in the template with a username and password field, but the hidden "next" field has no value, the form does not return error messages and there's no response on submit. Here is my code:
urls.py
urlpatterns = patterns('',
url(r'^accounts/login/$', 'django.contrib.auth.views.login', {
'template_name': 'accounts/login.html'
}
)
templates/accounts/login.html
{% extends 'base.html' %}
{% load url from future %}
{% block content %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %}
<div class="form-item">
{{ form.username.label_tag }}
{{ form.username }}
</div>
<div class="form-item">
{{ form.password.label_tag }}
{{ form.password }}
</div>
<input type="submit" value="login" />
<input type="hidden" name="next" value="{{ next|escape }}" />
</form>
{% endblock %}