mercredi 24 décembre 2014

Peewee : How to validate login details on form submit

Currently I am working on the project . I am new python , peewee.


I need to check given login credentials valid or not ?


I searched so many sites to find this ans. But i am getting exact ans what i want ?


Find something i done below :



def process(self):
email = self.get_argument("username")
password = self.get_argument("password")
print Email, Password
try:
result = Employee.select().where(Employee.Email_ID == email , Employee.Password == password)
print 'Query is ', result
if result == None:
print 'Failure'
else:
print 'Success'
except Exception as e:
print(e)
return self.render_template("index.py")


can you help me out in this. I did wrong? Thanks in advance


Aucun commentaire:

Enregistrer un commentaire