Skip to content

Instantly share code, notes, and snippets.

@aaquirogal

aaquirogal/login.html

Last active Dec 7, 2017
Embed
What would you like to do?
Django autentication example - app/templates/auth/login.html
{% extends "layout/base.html" %}
{% load static %}
{% block title %}Iniciar sesión{% endblock %}
{% block content %}
<div class="LoginForm">
<div class="row">
<div class="col-md-4 offset-md-4">
<form method="post">
{% csrf_token %}
{% if form.non_field_errors %}
<div class="form-group">
{{ form.non_field_errors }}
</div>
{% endif %}
{% for field in form.visible_fields %}
<div class="form-group">
{{ field.label_tag }}
{{ field }}
{{ field.errors }}
<div class="helpText">{{ field.help_text|safe }}</div>
</div>
{% endfor %}
<p>
<a href="#">Olvidé mi contraseña</a>
</p>
<button type="submit" class="btn btn-theme">Ingresar</button>
</form>
</div>
</div>
</div>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment