From 5596da3ff91a35d34bd086a13d2384dbd343c668 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 26 Jul 2017 10:59:10 +0100 Subject: [PATCH] Address deprecation warning around wtf Form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s been renamed to avoid a conflict. Not a conflict we have to worry about. So we can just change our import and get rid of the deprecation warning. --- app/main/forms.py | 2 +- app/main/views/styleguide.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index d9afad2f1..0b92466dd 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1,7 +1,7 @@ import re import pytz -from flask_wtf import Form +from flask_wtf import FlaskForm as Form from datetime import datetime, timedelta from notifications_utils.recipients import ( validate_phone_number, diff --git a/app/main/views/styleguide.py b/app/main/views/styleguide.py index 44a2b0ba3..52cc05de1 100644 --- a/app/main/views/styleguide.py +++ b/app/main/views/styleguide.py @@ -1,5 +1,5 @@ from flask import render_template, current_app, abort -from flask_wtf import Form +from flask_wtf import FlaskForm as Form from wtforms import StringField, PasswordField, TextAreaField, FileField, validators from notifications_utils.template import Template from app.main import main