This commit is contained in:
Rich
2021-07-03 08:40:30 +01:00
parent 582fca2e90
commit a38c6af449
4 changed files with 39 additions and 1 deletions

10
app/models.py Normal file
View File

@@ -0,0 +1,10 @@
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
class User(UserMixin):
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)