Browse Source

Fix deprecation warning

flask.ext.babel and flask.ext.wtf have been replaced by flask_babel and
flask_ext.
remotes/origin/develop
Jan Dittberner 5 years ago
parent
commit
da2d299e97
  1. 2
      debianmemberportfolio/__init__.py
  2. 4
      debianmemberportfolio/forms.py
  3. 2
      debianmemberportfolio/model/urlbuilder.py
  4. 2
      debianmemberportfolio/views.py
  5. 4
      docs/source/devdocs.rst

2
debianmemberportfolio/__init__.py

@ -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)

4
debianmemberportfolio/forms.py

@ -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

2
debianmemberportfolio/model/urlbuilder.py

@ -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()

2
debianmemberportfolio/views.py

@ -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

4
docs/source/devdocs.rst

@ -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…
Cancel
Save