From d417aeeda60efc3150385ff261c82a0896801056 Mon Sep 17 00:00:00 2001 From: yuzhanglong Date: Tue, 24 Mar 2020 13:28:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=BA=E5=B0=91=E7=9A=84?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/templateMaker/spiders/spider.py | 1 + app/validators/forms.py | 2 +- manage.py | 3 ++- requirements.txt | 4 +++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/utils/templateMaker/spiders/spider.py b/app/utils/templateMaker/spiders/spider.py index 8efe95c..4e71b6f 100644 --- a/app/utils/templateMaker/spiders/spider.py +++ b/app/utils/templateMaker/spiders/spider.py @@ -4,6 +4,7 @@ import requests from bs4 import BeautifulSoup +import html5lib class Spider: diff --git a/app/validators/forms.py b/app/validators/forms.py index ce9474b..c10df62 100644 --- a/app/validators/forms.py +++ b/app/validators/forms.py @@ -42,7 +42,7 @@ class QuestionnaireForm(BaseForm): isSecret = BooleanField() secretKey = StringField() condition = BooleanField() - title = StringField(validators=[Length(max=18, min=3, message="问卷标题长度必须大于%(min)d且小于%(max)d")]) + title = StringField(validators=[Length(max=18, min=0, message="问卷标题长度必须小于%(max)d")]) subTitle = StringField() wechatControl = BooleanField() ipControl = BooleanField() diff --git a/manage.py b/manage.py index 1ba3dab..62d4f47 100644 --- a/manage.py +++ b/manage.py @@ -1,11 +1,12 @@ from app import createApp +from app.api.error.errorHandler import Success app = createApp() @app.route('/') def hello_world(): - return 'Hello World!' + return Success(information="your project is running now~ (◕ᴗ◕✿)") if __name__ == '__main__': diff --git a/requirements.txt b/requirements.txt index 05c12d3..8948b38 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,7 @@ Flask-HTTPAuth==3.3.0 Flask-Mail==0.9.1 flask-mongoengine==0.9.5 Flask-WTF==0.14.3 +html5lib==1.0.1 idna==2.9 itsdangerous==1.1.0 Jinja2==2.11.1 @@ -27,5 +28,6 @@ six==1.14.0 soupsieve==2.0 tzlocal==2.0.0 urllib3==1.25.8 +webencodings==0.5.1 Werkzeug==1.0.0 -WTForms==2.2.1 \ No newline at end of file +WTForms==2.2.1