您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

25 行
788 B

# -*- coding: utf-8 -*-
"""
:author: Grey Li (李辉)
:url: http://greyli.com
:copyright: © 2018 Grey Li <withlihui@gmail.com>
:license: MIT, see LICENSE for more details.
"""
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, TextAreaField
from wtforms.validators import DataRequired, Optional, Length
class DescriptionForm(FlaskForm):
description = TextAreaField('描述', validators=[Optional(), Length(0, 500)])
submit = SubmitField('提交')
class TagForm(FlaskForm):
tag = StringField('增加标签 (使用空格分开)', validators=[Optional(), Length(0, 64)])
submit = SubmitField('提交')
class CommentForm(FlaskForm):
body = TextAreaField('', validators=[DataRequired()])
submit = SubmitField('提交')