Source

freehg / templates / registration / login.html

{% extends "base.html" %}
{% load i18n %}

{% block title %}Login{% endblock %}

{% block content %}

{% if error_message %}
<p class="error">{{ error_message }}</p>
{% endif %}

<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
<div class="span-7 last">
    <fieldset>
        <legend>Login:</legend>
        {% if form.username.errors %}{{ form.username.html_error_list }}{% endif %}
        <p><label for="id_username">{% trans 'Username:' %}</label> <br /><input type="text" name="username" id="id_username" /></p>

        {% if form.password.errors %}{{ form.password.html_error_list }}{% endif %}
        <p><label for="id_password">{% trans 'Password:' %}</label><br /> <input type="password" name="password" id="id_password" /></p>
        <input type="hidden" name="this_is_the_login_form" value="1" />
        <input type="hidden" name="post_data" value="{{ post_data }}" />

        <label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}" />
    </fieldset>
</div>
</form>

<script type="text/javascript">
document.getElementById('id_username').focus()
</script>
</div>
{% endblock %}