Fix deprecation warning
flask.ext.babel and flask.ext.wtf have been replaced by flask_babel and flask_ext.
This commit is contained in:
parent
075d6665ae
commit
da2d299e97
5 changed files with 7 additions and 7 deletions
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
|
||||
from flask import Flask
|
||||
from flask.ext.babel import Babel
|
||||
from flask_babel import Babel
|
||||
|
||||
app = Flask(__name__)
|
||||
babel = Babel(app)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from flask.ext.babel import gettext as _
|
||||
from flask.ext.wtf import Form
|
||||
from flask_babel import gettext as _
|
||||
from flask_wtf import Form
|
||||
from wtforms import IntegerField, StringField, RadioField
|
||||
from wtforms.validators import (
|
||||
AnyOf, DataRequired, Email, Length, Optional, Regexp
|
||||
|
|
|
@ -32,7 +32,7 @@ from encodings.utf_8 import StreamReader as UTF8StreamReader
|
|||
import pkg_resources
|
||||
from debianmemberportfolio.model import keyfinder
|
||||
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()
|
||||
|
|
|
@ -25,7 +25,7 @@ import logging
|
|||
|
||||
from debianmemberportfolio import app, babel
|
||||
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 .forms import DeveloperData, DeveloperDataRequest
|
||||
from .model import dddatabuilder
|
||||
|
|
|
@ -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
|
||||
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
|
||||
translation using the :py:func:`~flask.ext.babel.lazy_gettext` function from
|
||||
:py:mod:`flask.ext.babel`.
|
||||
translation using the :py:func:`~flask_babel.lazy_gettext` function from
|
||||
:py:mod:`flask_babel`.
|
||||
|
||||
The patterns in :file:`portfolio.ini` can contain the following placeholders
|
||||
that are filled at runtime:
|
||||
|
|
Loading…
Reference in a new issue