From 39ad85577cab3098a37958a5466654f92b9a2244 Mon Sep 17 00:00:00 2001 From: Bhagyajkumar Date: Fri, 7 Jan 2022 08:49:40 +0530 Subject: [PATCH] changed required to DataRequired in auth-flask-login example and updated requirements.txt --- examples/auth-flask-login/app.py | 8 ++++---- examples/sqla/requirements.txt | Bin 314 -> 926 bytes 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/auth-flask-login/app.py b/examples/auth-flask-login/app.py index b29803841..248e4fa53 100644 --- a/examples/auth-flask-login/app.py +++ b/examples/auth-flask-login/app.py @@ -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() @@ -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: diff --git a/examples/sqla/requirements.txt b/examples/sqla/requirements.txt index f010af00b6b6db57ee03942cd6210bc0444cab2b..1844b2ea6d41d079e7f16cecbca1710da25bf382 100644 GIT binary patch literal 926 zcmZ`&%TB^j6r8n*pHcz^3@%(~q6>oygN8MaD^#EwXjS-lb>^JDl4_bu$$8AonREN| zJ;R>Q8$NNxr-u$=o*vF|h8xTRCx z+9o_!ldHqGvZ7~!Ps+N$d7HEPJaQr}eDAZ*9Y|PvFppBI3AXi|5%rgTIK#bZeI-I{ zSz*-MePDb~A9HSK!v8PCYGX9F7ZsZc?8%5--zVK0*X;GD0;$Vry}JW@++)RhxG+6( zPq!pc!^XCo*;J(;KJ|Z|3Q6}d=A9POUv&|l3%%}=dr)i6$UG-=!e6n|6V^MSN0g@Jafk6#K0}AxCkmwXCl}9j|1OtKp*V6-b zx)9vCjDQsx$S75)Xw|Lt&29=ht)K&xkv5S6HMa)*fuQlg!-jez;FJrBaJp5JGYqD2 T%T(Ex@)=CEK+i^@c3#~t1XFB~