Joshua Carp 7 years ago
parent 43545fb510
commit 45e698b5aa
  1. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/public/forms.py
  2. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/forms.py

@ -1,13 +1,13 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Public forms.""" """Public forms."""
from flask_wtf import Form from flask_wtf import FlaskForm
from wtforms import PasswordField, StringField from wtforms import PasswordField, StringField
from wtforms.validators import DataRequired from wtforms.validators import DataRequired
from {{cookiecutter.app_name}}.user.models import User from {{cookiecutter.app_name}}.user.models import User
class LoginForm(Form): class LoginForm(FlaskForm):
"""Login form.""" """Login form."""
username = StringField('Username', validators=[DataRequired()]) username = StringField('Username', validators=[DataRequired()])

@ -1,13 +1,13 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""User forms.""" """User forms."""
from flask_wtf import Form from flask_wtf import FlaskForm
from wtforms import PasswordField, StringField from wtforms import PasswordField, StringField
from wtforms.validators import DataRequired, Email, EqualTo, Length from wtforms.validators import DataRequired, Email, EqualTo, Length
from .models import User from .models import User
class RegisterForm(Form): class RegisterForm(FlaskForm):
"""Register form.""" """Register form."""
username = StringField('Username', username = StringField('Username',

Loading…
Cancel
Save