Skip to content

Commit

Permalink
fix for wtforms 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sfermigier committed Jul 12, 2018
1 parent a5b282b commit c8dd02e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions abilian/web/forms/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,9 +759,9 @@ class LocaleSelectField(SelectField):

def __init__(self, *args, **kwargs):
kwargs["coerce"] = LocaleSelectField.coerce
kwargs["choices"] = (
kwargs["choices"] = [
locale_info for locale_info in i18n.supported_app_locales()
)
]
super(LocaleSelectField, self).__init__(*args, **kwargs)

@staticmethod
Expand Down Expand Up @@ -790,7 +790,7 @@ class TimezoneField(SelectField):

def __init__(self, *args, **kwargs):
kwargs["coerce"] = babel.dates.get_timezone
kwargs["choices"] = (tz_info for tz_info in i18n.timezones_choices())
kwargs["choices"] = [tz_info for tz_info in i18n.timezones_choices()]
super(TimezoneField, self).__init__(*args, **kwargs)

def iter_choices(self):
Expand Down
3 changes: 0 additions & 3 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ flask-sqlalchemy<=2.1
# Currently broken w/ 0.13
Flask-WTF>=0.12,<0.13

# Currently broken w/ 2.2
wtforms<2.2

# Forms add-ons
WTForms-Alchemy>=0.12
WTForms-Components>=0.10
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ whoosh==2.7.4
wtforms-alchemy==0.16.7
wtforms-components==0.10.3
wtforms-sqlalchemy==0.1
wtforms==2.1
wtforms==2.2.1 # via flask-wtf, wtforms-alchemy, wtforms-components, wtforms-sqlalchemy

0 comments on commit c8dd02e

Please sign in to comment.