I study flask under articles from a habr. Following the example, I wrote such a block of code:

from flask.ext.wtf import Form from wtforms import TextField, BooleanField from wtforms.validators import Required class LoginFrom(Form): openid = TextField('openid', validators=[Required()]) remember_me = BooleanField('remember_me', default=False) 

PyCharm tells you that the TextField and Required classes are deprecated. How to fix the code?

    1 answer 1

    TextField to replace on StringField, and Required on DataRequired.

    What's New in WTForms 3: Deprecated API's