Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed required to DataRequired in auth-flask-login eg. #2212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/auth-flask-login/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def __unicode__(self):

# Define login and registration forms (for flask-login)
class LoginForm(form.Form):
login = fields.StringField(validators=[validators.required()])
password = fields.PasswordField(validators=[validators.required()])
login = fields.StringField(validators=[validators.DataRequired()])
password = fields.PasswordField(validators=[validators.DataRequired()])

def validate_login(self, field):
user = self.get_user()
Expand All @@ -76,9 +76,9 @@ def get_user(self):


class RegistrationForm(form.Form):
login = fields.StringField(validators=[validators.required()])
login = fields.StringField(validators=[validators.DataRequired()])
email = fields.StringField()
password = fields.PasswordField(validators=[validators.required()])
password = fields.PasswordField(validators=[validators.DataRequired()])

def validate_login(self, field):
if db.session.query(User).filter_by(login=self.login.data).count() > 0:
Expand Down
Binary file modified examples/sqla/requirements.txt
Binary file not shown.