def create_by_email(cls, email, pw): src = cls( email = email, password = get_hmac(pw)) db.session.add(src) db.session.commit() return src
def create_by_email(cls, email, pw): src = cls(email=email, password=get_hmac(pw)) db.session.add(src) db.session.commit() return src
def check_pw(self, pw): return self.password == get_hmac(pw)