From de74fe61f4cc55e187ba3722218a82e0c6c5e08f Mon Sep 17 00:00:00 2001 From: rachmadaniHaryono Date: Tue, 7 May 2019 19:59:55 +0800 Subject: [PATCH] fix: dev: wtforms warning --- bukuserver/forms.py | 2 +- bukuserver/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bukuserver/forms.py b/bukuserver/forms.py index 3f78adc..51a197f 100644 --- a/bukuserver/forms.py +++ b/bukuserver/forms.py @@ -17,7 +17,7 @@ class HomeForm(SearchBookmarksForm): class BookmarkForm(FlaskForm): url = wtforms.StringField( - validators=[wtforms.validators.required(), wtforms.validators.URL(require_tld=False)]) + validators=[wtforms.validators.DataRequired(), wtforms.validators.URL(require_tld=False)]) title = wtforms.StringField() tags = wtforms.StringField() description = wtforms.TextAreaField() diff --git a/bukuserver/views.py b/bukuserver/views.py index 0137280..32cc513 100644 --- a/bukuserver/views.py +++ b/bukuserver/views.py @@ -381,7 +381,7 @@ class TagModelView(BaseModelView): def scaffold_form(self): class CustomForm(FlaskForm): # pylint: disable=too-few-public-methods - name = wtforms.StringField(validators=[wtforms.validators.required()]) + name = wtforms.StringField(validators=[wtforms.validators.DataRequired()]) return CustomForm