Skip to content

Commit

Permalink
chore: support for wtforms 3.1 (#1248)
Browse files Browse the repository at this point in the history
azmeuk authored Oct 18, 2023
1 parent eb7338c commit c9a7099
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ihatemoney/templates/forms.html
Original file line number Diff line number Diff line change
@@ -179,7 +179,11 @@
<a class="badge badge-secondary" href="#" id="selectnone" onclick="selectCheckboxes(false)">{{_("No one")}}</a>
</p>
<div class="d-flex flex-column flex-wrap overflow-auto" style="max-height: 20em;">
{% for key, value, checked in form.payed_for.iter_choices() | sort(attribute='1') %}
{% for choices in form.payed_for.iter_choices() | sort(attribute='1') %}
{# Compatibility with wtforms<3.1 #}
{% set key = choices[0] %}
{% set value = choices[1] %}
{% set checked = choices[2] %}
<p class="form-check text-break" style="max-width: 50%;">
<label for="payed_for-{{key}}" class="form-check-label">
<input name="payed_for" type="checkbox" {% if checked %}checked{% endif %} class="form-check-input" value="{{key}}" id="payed_for-{{key}}"/>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ dependencies = [
"Flask-SQLAlchemy>=2.4,<3",
"Flask-Talisman>=0.8,<2",
"Flask-WTF>=0.14.3,<2",
"WTForms>=2.3.1,<3.1",
"WTForms>=2.3.1,<3.2",
"Flask>=2,<2.3",
"Werkzeug>=2,<2.3",
"itsdangerous>=2,<3",

0 comments on commit c9a7099

Please sign in to comment.