Project_Fish/models.py
2021-11-07 22:40:34 +01:00

22 lines
517 B
Python

from flask_login import UserMixin
class User(UserMixin):
def __init__(self , username , password , id , active=True, salt=""):
self.id = id
self.username = username
self.password = password
self.active = active
self.salt = salt
def get(self):
return self.id
def get_id(self):
return self.id
def is_active(self):
return self.active
# def get_auth_token(self):
# return make_secure_token(self.username , key='secret_key')