diff options
author | Matthew Lemon <y@yulqen.org> | 2024-04-23 11:16:38 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-04-23 11:16:38 +0100 |
commit | 0f951dcf029d4af284467543a3afdf5bf6581a20 (patch) | |
tree | a48384210cdc168e3bd3ccff6d6d516eeed9e748 /core/templates/registration/login.html | |
parent | 8b084e9fe7a5f3a04c32daf9a24f7f2cf67300f9 (diff) |
switched to Django
Diffstat (limited to 'core/templates/registration/login.html')
-rw-r--r-- | core/templates/registration/login.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/core/templates/registration/login.html b/core/templates/registration/login.html new file mode 100644 index 0000000..9e00087 --- /dev/null +++ b/core/templates/registration/login.html @@ -0,0 +1,43 @@ +{% extends "core/base.html" %} + +{% block content %} + +<div class="w3-container"> + {% if form.errors %} + <p>Your username and password didn't match. Please try again.</p> + {% endif %} + + {% if next %} + {% if user.is_authenticated %} + <p>Your account doesn't have access to this page. To proceed, + please login with an account that has access.</p> + {% else %} + <p>Please login to see this page.</p> + {% endif %} + {% endif %} + + <form method="post" action="{% url 'login' %}"> + {% csrf_token %} + <div class="form-group"> + {{ form.username.label_tag }} + {{ form.username }} + </div> + + <div class="form-group"> + {{ form.password.label_tag }} + {{ form.password }} + </div> + + <div class="form-group"> + <button type="submit" class="btn btn-primary" value="login">Log In</button> + </div> + <input type="hidden" name="next" value="{{ next }}"> + </form> + + <div class="form-group"> + {# Assumes you set up the password_reset view in your URLconf #} + <a href="{% url 'password_reset' %}">Lost password?</a> + </div> + + {% endblock content %} +</div> |