BaseCollectionForm

This commit is contained in:
SvyatoslavArtymovych 2023-04-28 10:50:59 +03:00
parent 5af7933674
commit c9bf181638
1 changed files with 4 additions and 5 deletions

View File

@ -3,15 +3,14 @@ from wtforms import StringField, SubmitField
from wtforms.validators import DataRequired, Length
class CreateCollectionForm(FlaskForm):
class BaseCollectionForm(FlaskForm):
label = StringField("Label", [DataRequired(), Length(3, 256)])
about = StringField("About")
class CreateCollectionForm(BaseCollectionForm):
submit = SubmitField("Create")
class EditCollectionForm(FlaskForm):
label = StringField("Label", [Length(3, 256)])
about = StringField("About")
class EditCollectionForm(BaseCollectionForm):
submit = SubmitField("Edit")