diff --git a/app/forms/collection.py b/app/forms/collection.py index 9308672..24fca35 100644 --- a/app/forms/collection.py +++ b/app/forms/collection.py @@ -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")