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.
10 lines
524 B
10 lines
524 B
4 years ago
|
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=5, validators = [NumberRange(min=0, max=100)])
|
||
|
retention_type = SelectField('Retention', choices = [ 'Minute', 'Hour', 'Day', 'Time'], default=2, validators = [Required()])
|
||
|
submit = SubmitField('Shorten Url')
|