Created
February 13, 2020 19:54
-
-
Save Porter97/084ff5141e7668d2a37e870117af426c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#... | |
from wtforms.validators import DataRequired, Length, Email, Regexp, URL | |
#... | |
class ContentForm(FlaskForm): | |
collection = SelectField(label='Collection', render_kw={'class': 'input-field'}, coerce=int, validators=[DataRequired()]) | |
title = StringField(label='Title', validators=[DataRequired()]) | |
description = StringField(label='Description') | |
url = StringField(label='URL', validators=[URL(), DataRequired()]) | |
submit = SubmitField('Submit') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment