Fix deprecation warning

flask.ext.babel and flask.ext.wtf have been replaced by flask_babel and
flask_ext.
This commit is contained in:
Jan Dittberner 2017-02-17 11:57:38 +01:00
parent 075d6665ae
commit da2d299e97
5 changed files with 7 additions and 7 deletions

View file

@ -22,7 +22,7 @@
# #
from flask import Flask from flask import Flask
from flask.ext.babel import Babel from flask_babel import Babel
app = Flask(__name__) app = Flask(__name__)
babel = Babel(app) babel = Babel(app)

View file

@ -1,7 +1,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from flask.ext.babel import gettext as _ from flask_babel import gettext as _
from flask.ext.wtf import Form from flask_wtf import Form
from wtforms import IntegerField, StringField, RadioField from wtforms import IntegerField, StringField, RadioField
from wtforms.validators import ( from wtforms.validators import (
AnyOf, DataRequired, Email, Length, Optional, Regexp AnyOf, DataRequired, Email, Length, Optional, Regexp

View file

@ -32,7 +32,7 @@ from encodings.utf_8 import StreamReader as UTF8StreamReader
import pkg_resources import pkg_resources
from debianmemberportfolio.model import keyfinder from debianmemberportfolio.model import keyfinder
from urllib.parse import quote_plus from urllib.parse import quote_plus
from flask.ext.babel import gettext as _, lazy_gettext as N_ from flask_babel import gettext as _, lazy_gettext as N_
my_config = ConfigParser() my_config = ConfigParser()

View file

@ -25,7 +25,7 @@ import logging
from debianmemberportfolio import app, babel from debianmemberportfolio import app, babel
from flask import g, make_response, request, render_template, abort from flask import g, make_response, request, render_template, abort
from flask.ext.babel import lazy_gettext as N_ from flask_babel import lazy_gettext as N_
from config import LANGUAGES from config import LANGUAGES
from .forms import DeveloperData, DeveloperDataRequest from .forms import DeveloperData, DeveloperDataRequest
from .model import dddatabuilder from .model import dddatabuilder

View file

@ -123,8 +123,8 @@ dictionary keys correspond to sections in the ini file. The dictionary values
are dictionaries themselves that contain a special key ``label`` that defines are dictionaries themselves that contain a special key ``label`` that defines
the label of the section in the output and keys for each entry to be rendered the label of the section in the output and keys for each entry to be rendered
in that section. The values in these sub-dictionaries are strings marked for in that section. The values in these sub-dictionaries are strings marked for
translation using the :py:func:`~flask.ext.babel.lazy_gettext` function from translation using the :py:func:`~flask_babel.lazy_gettext` function from
:py:mod:`flask.ext.babel`. :py:mod:`flask_babel`.
The patterns in :file:`portfolio.ini` can contain the following placeholders The patterns in :file:`portfolio.ini` can contain the following placeholders
that are filled at runtime: that are filled at runtime: