Skip to content

Commit

Permalink
fix crispy forms
Browse files Browse the repository at this point in the history
Signed-off-by: Jason <git@jasoncameron.dev>
  • Loading branch information
JasonLovesDoggo committed Aug 31, 2024
1 parent 9093abf commit 44ba170
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions metropolis/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"django_select2",
"pwa",
"oauth2_provider",
"crispy_forms",
"hijack",
"hijack.contrib.admin", # show a hijack button on admin.
"drf_spectacular",
Expand Down
Binary file modified requirements.txt
Binary file not shown.
6 changes: 3 additions & 3 deletions templates/account/email.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% extends "account/base.html" %}
{% load crispy_forms_filters %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}
{% trans "E-mail Addresses" %}
{% endblock %}
{% block content %}
{% if user.emailaddress_set.all %}
<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
<form action="{% url 'account_email' %}" class="email_list" method="post">
<form action="{% url account_email %}" class="email_list" method="post">
{% csrf_token %}
<fieldset class="blockLabels">
{% for emailaddress in user.emailaddress_set.all %}
Expand Down Expand Up @@ -50,7 +50,7 @@
</p>
{% endif %}
<h2>{% trans "Add E-mail Address" %}</h2>
<form method="post" action="{% url 'account_email' %}" class="add_email">
<form method="post" action="{% url account_email %}" class="add_email">
{% csrf_token %}
{{ form|crispy }}
<button type="submit" name="action_add" class="btn btn-primary mb-3">{% trans "Add E-mail" %}</button>
Expand Down
4 changes: 2 additions & 2 deletions templates/account/password_set.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% extends 'account/base.html' %}
{% load crispy_forms_tags %}
{% load crispy_forms_filters %}
{% load i18n %}
{% block head_title %}
{% trans "Set Password" %}
{% endblock %}
{% block content %}
<form method="POST"
action="{% url 'account_set_password' %}"
action="{% url account_set_password %}"
class="password_set">
{% csrf_token %}
{{ form|crispy }}
Expand Down

0 comments on commit 44ba170

Please sign in to comment.