Skip to content

Commit

Permalink
Added login template
Browse files Browse the repository at this point in the history
  • Loading branch information
fbanados committed Jan 20, 2025
1 parent 3406f83 commit d7a5c36
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/morphodict/frontend/templates/registration/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{% extends "morphodict/base.html" %}

{% block content %}

{% 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 'user_login' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>

<input type="submit" value="login">
<input type="hidden" name="next" value="{{ next }}">
</form>

{# Assumes you set up the password_reset view in your URLconf #}
{# <p><a href="{% url 'password_reset' %}">Lost password?</a></p> #}

{% endblock %}

0 comments on commit d7a5c36

Please sign in to comment.