예제 #1
0
 class MySendConfirmationForm(SendConfirmationForm):
     email = TextField('My Send Confirmation Email Address Field')
예제 #2
0
from sqlalchemy import func
from beavy.app import db

# Define models
roles_users = db.Table(
    'roles_users',
    db.Column('user_id',
              db.Integer(),
              db.ForeignKey('user.id'),
              nullable=False),
    db.Column('role_id',
              db.Integer(),
              db.ForeignKey('role.id'),
              nullable=False))

RegisterForm.name = TextField('Full Name')
ConfirmRegisterForm.name = TextField('Full Name')


class User(db.Model, UserMixin):
    __LOOKUP_ATTRS__ = []
    id = db.Column(db.Integer, primary_key=True)
    created_at = db.Column('created_at',
                           db.DateTime(),
                           nullable=False,
                           server_default=func.now())
    email = db.Column(db.String(255), unique=True, nullable=False)
    name = db.Column(db.String(255))
    password = db.Column(db.String(255))
    active = db.Column(db.Boolean())
    confirmed_at = db.Column(db.DateTime())
예제 #3
0
 class MyPasswordlessLoginForm(PasswordlessLoginForm):
     email = TextField('My Passwordless Login Email Address Field')
예제 #4
0
 class MyConfirmRegisterForm(ConfirmRegisterForm):
     email = TextField('My Confirm Register Email Address Field')
예제 #5
0
 class MyRegisterForm(RegisterForm):
     email = TextField('My Register Email Address Field')
예제 #6
0
 class MyForgotPasswordForm(ForgotPasswordForm):
     email = TextField('My Forgot Password Email Address Field',
                       validators=[valid_user_email])
예제 #7
0
 class MyLoginForm(LoginForm):
     email = TextField('My Login Email Address Field')
예제 #8
0
class SpecialRegisterForm(RegisterForm):
    name = TextField('Full Name')
예제 #9
0
 class MyResetPasswordForm(ResetPasswordForm):
     password = TextField('My Reset Password Field')
예제 #10
0
 class MyForgotPasswordForm(ForgotPasswordForm):
     email = TextField(
         'My Forgot Email Address Field',
         validators=[email_required, email_validator, valid_user_email])
예제 #11
0
class ExtendedConfirmRegisterForm(ConfirmRegisterForm):
    name = TextField('Name', [validators.Length(min=1, max=35)])