You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from flask_wtf import FlaskForm
|
|
|
|
from wtforms import StringField, IntegerField, SelectField, SubmitField
|
|
|
|
from wtforms.validators import DataRequired, NumberRange, Required
|
|
|
|
|
|
|
|
class UrlForm(FlaskForm):
|
|
|
|
url = StringField('Url', validators=[DataRequired()])
|
|
|
|
retention = IntegerField('Retention', default=1, validators = [NumberRange(min=0, max=100)])
|
|
|
|
retention_type = SelectField('Retention', choices = [(1, 'Minute'), (2, 'Hour'), (3, 'Day'), (4, 'Time')], default=3, validators = [Required()])
|
|
|
|
submit = SubmitField('Shorten Url')
|