{% extends "base.html" %}

{% block content %}
<div class="span9">
  <h1>Login</h1>
     <form action="{% url django.contrib.auth.views.login %}" method="POST" accept-charset="utf-8">
        {% csrf_token %}
          <fieldset>
          <legend>Introduce tu usuario</legend>
          <hr/>
          {% if form.errors %}
            <div class="alert alert-error">
              <p>Tu usuario o contraseña son incorrectos, intentalo de nuevo.</p>
            </div>
          {% endif %}

          <dl class="dl-horizontal">
                    {% for field in form %}
                        <dt>{{ field.label }}</dt>
                            <dd>{{ field }} {% if field.errors %}</dd>
                            <dd>{{ field.errors }}{% endif  %}</dd>
                    {% endfor %}
              </dl>
            <div class="form-actions">
              <button type="submit" class="btn btn-primary btn-large">Iniciar sesión &rarr;</button>
            </div>
        </fieldset>
    </form>
</div>


{% endblock %}
