Codebase Update
This commit is contained in:
31
apps/authentication/forms.py
Normal file
31
apps/authentication/forms.py
Normal file
@ -0,0 +1,31 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
"""
|
||||
Copyright (c) 2019 - present AppSeed.us
|
||||
"""
|
||||
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, PasswordField
|
||||
from wtforms.validators import Email, DataRequired
|
||||
|
||||
# login and registration
|
||||
|
||||
|
||||
class LoginForm(FlaskForm):
|
||||
username = StringField('Username',
|
||||
id='username_login',
|
||||
validators=[DataRequired()])
|
||||
password = PasswordField('Password',
|
||||
id='pwd_login',
|
||||
validators=[DataRequired()])
|
||||
|
||||
|
||||
class CreateAccountForm(FlaskForm):
|
||||
username = StringField('Username',
|
||||
id='username_create',
|
||||
validators=[DataRequired()])
|
||||
email = StringField('Email',
|
||||
id='email_create',
|
||||
validators=[DataRequired(), Email()])
|
||||
password = PasswordField('Password',
|
||||
id='pwd_create',
|
||||
validators=[DataRequired()])
|
||||
Reference in New Issue
Block a user