Last active
February 2, 2025 13:04
-
-
Save hcosta/7c3a46d5e5d061d936031ad5a6654acd to your computer and use it in GitHub Desktop.
Revisión del template para identificarse en el curso Django 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'core/base.html' %} | |
{% load static %} | |
{% block title %}Iniciar sesión{% endblock %} | |
{% block content %} | |
<style>.errorlist{color:red;}</style> | |
<main role="main"> | |
<div class="container"> | |
<div class="row mt-3"> | |
<div class="col-md-9 mx-auto mb-5"> | |
<form action="" method="post">{% csrf_token %} | |
<h3 class="mb-4">Iniciar sesión</h3> | |
{% if form.non_field_errors %} | |
<p style="color:red">Usuario o contraseña incorrectos, prueba de nuevo.</p> | |
{% endif %} | |
<p> | |
<input type="text" name="username" autofocus maxlength="254" required | |
id="id_username" class="form-control" placeholder="Nombre de usuario"/> | |
</p> | |
<p> | |
<input type="password" name="password" required | |
id="id_password" class="form-control" placeholder="Contraseña"/> | |
</p> | |
<p><input type="submit" class="btn btn-primary btn-block" value="Acceder"></p> | |
</form> | |
</div> | |
</div> | |
</div> | |
</main> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment