summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/forms.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/forms.py b/app/forms.py
index 250bc21..0bbb745 100644
--- a/app/forms.py
+++ b/app/forms.py
@@ -2,10 +2,9 @@
import flask
from flask.ext.wtf import Form as _Form
from wtforms.fields import BooleanField, DateField, IntegerField, StringField, HiddenField, PasswordField
-from wtforms import fields, validators, ValidationError
+from wtforms import fields, validators, ValidationError, Form as WTForm
from wtforms.ext.sqlalchemy.fields import QuerySelectField
-from wtforms.ext.i18n.form import Form as i18nForm
from . import app
@@ -21,9 +20,9 @@ class DecimalField(fields.DecimalField):
req = [validators.input_required()]
-class Form(_Form, i18nForm):
- # docs say LOCALES, code says LANGUAGES ... use both :)
- LANGUAGES = LOCALES = ['de_DE', 'de']
+class Form(_Form):
+ class Meta:
+ locales = ['de_DE', 'de']
def __init__ (self, *args, **kwargs):
self._msg = kwargs.pop('flash', u"Fehler im Formular!")
@@ -46,4 +45,4 @@ class Form(_Form, i18nForm):
# use WTForms builtin translation support instead of the flask-babael
# stuff added by flask-wtf
# FIXME: remove this, if flask-babel is used in the app
- return i18nForm._get_translations(self)
+ return WTForm._get_translations(self)