parent
74f779e0f8
commit
722c2777d5
@ -0,0 +1,9 @@ |
|||||||
|
from werkzeug.security import generate_password_hash, check_password_hash |
||||||
|
|
||||||
|
|
||||||
|
class User(db.Model): |
||||||
|
def set_password(self, password): |
||||||
|
self.password_hash = generate_password_hash(password) |
||||||
|
|
||||||
|
def check_password(self, password): |
||||||
|
return check_password_hash(self.password_hash, password) |
Loading…
Reference in new issue