from wtforms import Form, BooleanField, TextField, validators,PasswordField
class LoginForm(Form):
username = TextField('Username', [validators.Length(min=4, max=25)])
password = PasswordField('Password')
when i use LoginForm on webapp(gae) like this :
def post(self):
form=LoginForm(self.request)
but it show error :
...
wtforms is a forms validation and rendering library for python web development
but i can't find how to handle the username and email Unique ,
thanks
...
Hi I have a form class which looks like below:-
class UserCreateForm(wtf.Form):
name=wtf.TextField('Name',validators=[validators.Required(),username_check])
email=wtf.TextField('Email')
userimage=wtf.FileField(u'Upload Image',validators=[checkfile])
The custom validator function " checkfile" looks like this:-
def checkfi...