forked from crunk/distribusi-verse
crunk
3 years ago
4 changed files with 0 additions and 86 deletions
@ -1,8 +0,0 @@ |
|||
from flask_wtf import FlaskForm |
|||
from wtforms import SubmitField |
|||
|
|||
|
|||
class DistribusiForm(FlaskForm): |
|||
"""Distribusi class to launch your distribusi website""" |
|||
|
|||
submit = SubmitField("Distribusi!") |
@ -1,23 +0,0 @@ |
|||
"""Login form to validate user.""" |
|||
from wtforms import ( |
|||
StringField, |
|||
SubmitField, |
|||
PasswordField, |
|||
) |
|||
|
|||
from wtforms import validators |
|||
from wtforms.validators import Length, Email |
|||
from flask_wtf import FlaskForm |
|||
|
|||
|
|||
class LoginForm(FlaskForm): |
|||
"""Login distribusiverse form class.""" |
|||
|
|||
email = StringField( |
|||
"Email address:", |
|||
validators=[validators.InputRequired(), Email(), Length(6, 64)], |
|||
) |
|||
password = PasswordField( |
|||
"Password:", validators=[validators.InputRequired(), Length(12, 72)] |
|||
) |
|||
submit = SubmitField("Sign In") |
@ -1,32 +0,0 @@ |
|||
"""Register form to make a new user.""" |
|||
from wtforms import ( |
|||
StringField, |
|||
SubmitField, |
|||
PasswordField, |
|||
) |
|||
|
|||
from wtforms import validators |
|||
from wtforms.validators import Length, Email, EqualTo |
|||
from flask_wtf import FlaskForm |
|||
|
|||
|
|||
class RegisterForm(FlaskForm): |
|||
"""Register for distribusi-verse form class""" |
|||
|
|||
email = StringField( |
|||
"Email address:", |
|||
validators=[validators.InputRequired(), Email(), Length(6, 64)], |
|||
) |
|||
password = PasswordField( |
|||
"New password:", |
|||
validators=[validators.InputRequired(), Length(12, 72)], |
|||
) |
|||
confirmpassword = PasswordField( |
|||
"Confirm your password:", |
|||
validators=[ |
|||
validators.InputRequired(), |
|||
Length(12, 72), |
|||
EqualTo("password", message="Passwords must match !"), |
|||
], |
|||
) |
|||
submit = SubmitField("Register to Distribusi-verse") |
@ -1,23 +0,0 @@ |
|||
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(6, 100)], |
|||
) |
|||
zipfile = FileField( |
|||
"Upload your zip file with content here:", |
|||
validators=[FileAllowed(["zip"], "Zip archives only!")], |
|||
) |
|||
|
|||
submit = SubmitField("Upload") |
Loading…
Reference in new issue