Skip to content

Commit

Permalink
Bootstrapify login form
Browse files Browse the repository at this point in the history
  • Loading branch information
cc-a committed Sep 24, 2024
1 parent c12deba commit 0e7fdd1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions main/templates/registration/login.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends "../main/base.html" %}
{% load crispy_forms_tags %}
{% load django_bootstrap5 %}

{% block content %}

Expand All @@ -17,18 +19,9 @@

<form method="post" action="{% url 'main: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|crispy }}
{% bootstrap_button button_type="submit" content="Login" %}
</form>

{# Assumes you set up the password_reset view in your URLconf #}
Expand Down

0 comments on commit 0e7fdd1

Please sign in to comment.