open-law/app/forms/comment.py
Kostiantyn Stoliarskyi 6f07fd3faf comments created
2023-05-08 15:19:22 +03:00

14 lines
419 B
Python

from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, BooleanField
from wtforms.validators import DataRequired, Length
class BaseCommentForm(FlaskForm):
text = StringField("Text", [DataRequired(), Length(3, 256)])
marked = BooleanField("Marked")
included_with_interpretation = BooleanField("Included")
class CreateCommentForm(BaseCommentForm):
submit = SubmitField("Create")