Add user model

master
Neslihan 3 years ago
parent 74f779e0f8
commit 722c2777d5
  1. 9
      app/models.py

@ -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…
Cancel
Save