<s> from flask . ext . wtf import Form , Required , Email , Length <EOL> from flask . ext . wtf import PasswordField , SubmitField <EOL> from flask . ext . wtf . html5 import EmailField <EOL> from flaskext . babel import gettext as _ <EOL> from . . user . constants import ( PASSWORD_LEN_MIN , PASSWORD_LEN_MAX ) <EOL> class LoginForm ( Form ) : <EOL> email = EmailField ( <EOL> label = _ ( '<STR_LIT>' ) , <EOL> validators = [ <EOL> Email ( message = _ ( "<STR_LIT>" ) ) <EOL> ] <EOL> ) <EOL> password = PasswordField ( <EOL> label = _ ( '<STR_LIT>' ) , <EOL> validators = [ <EOL> Required ( ) , <EOL> Length ( <EOL> min = PASSWORD_LEN_MIN , <EOL> max = PASSWORD_LEN_MAX , <EOL> ) <EOL> ] <EOL> ) <EOL> submit = SubmitField ( _ ( '<STR_LIT>' ) ) </s>
