mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 20:51:49 +02:00
Support WTForms 3
This commit is contained in:
parent
c904f5a972
commit
632dff8c60
4 changed files with 20 additions and 7 deletions
|
@ -3,7 +3,7 @@ from functools import wraps
|
|||
from flask import current_app, request
|
||||
from flask_restful import Resource, abort
|
||||
from werkzeug.security import check_password_hash
|
||||
from wtforms.fields.core import BooleanField
|
||||
from wtforms.fields import BooleanField
|
||||
|
||||
from ihatemoney.forms import EditProjectForm, MemberForm, ProjectForm, get_billform_for
|
||||
from ihatemoney.models import Bill, Person, Project, db
|
||||
|
|
|
@ -9,9 +9,22 @@ from flask_wtf.file import FileAllowed, FileField, FileRequired
|
|||
from flask_wtf.form import FlaskForm
|
||||
from markupsafe import Markup
|
||||
from werkzeug.security import check_password_hash, generate_password_hash
|
||||
from wtforms.fields.core import Label, SelectField, SelectMultipleField
|
||||
from wtforms.fields.html5 import DateField, DecimalField, URLField
|
||||
from wtforms.fields.simple import BooleanField, PasswordField, StringField, SubmitField
|
||||
from wtforms.fields import (
|
||||
BooleanField,
|
||||
DateField,
|
||||
DecimalField,
|
||||
Label,
|
||||
PasswordField,
|
||||
SelectField,
|
||||
SelectMultipleField,
|
||||
StringField,
|
||||
SubmitField,
|
||||
)
|
||||
try:
|
||||
# Compat for WTForms <= 2.3.3
|
||||
from wtforms.fields.html5 import URLField
|
||||
except ModuleNotFoundError:
|
||||
from wtforms.fields import URLField
|
||||
from wtforms.validators import (
|
||||
URL,
|
||||
DataRequired,
|
||||
|
|
|
@ -539,7 +539,7 @@ class APITestCase(IhatemoneyTestCase):
|
|||
"amount": expected_amount,
|
||||
"date": "2011-08-10",
|
||||
"id": id,
|
||||
"external_link": "",
|
||||
"external_link": None,
|
||||
"original_currency": "XXX",
|
||||
"converted_amount": expected_amount,
|
||||
}
|
||||
|
@ -834,7 +834,7 @@ class APITestCase(IhatemoneyTestCase):
|
|||
"amount": 25.0,
|
||||
"date": "2011-08-10",
|
||||
"id": 1,
|
||||
"external_link": "",
|
||||
"external_link": None,
|
||||
"converted_amount": 25.0,
|
||||
"original_currency": "XXX",
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ install_requires =
|
|||
Flask-SQLAlchemy>=2.4,<3
|
||||
Flask-Talisman>=0.8,<1
|
||||
Flask-WTF>=0.14.3,<2
|
||||
WTForms>=2.3.1,<2.4
|
||||
WTForms>=2.3.1,<3.1
|
||||
Flask>=2,<3
|
||||
itsdangerous>=2,<3
|
||||
Jinja2>=3,<4
|
||||
|
|
Loading…
Reference in a new issue