distribusi-verse: medium-tech web app content management system for the web
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.
 
 
 
 
 

23 lines
619 B

from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed
from wtforms import validators
from wtforms.validators import Length
from wtforms import (
SubmitField,
StringField,
)
class UploadForm(FlaskForm):
"""File upload class for a new site in distribusi-verse"""
sitename = StringField(
"Name of your website:",
validators=[validators.InputRequired(), Length(2, 100)],
)
zipfile = FileField(
"Upload your zip file with content here:",
validators=[FileAllowed(["zip"], "Zip archives only!")],
)
submit = SubmitField("Upload")