Functional login and logout, login system should be fucntionally implemented.
Testing and polishing are next.
This commit is contained in:
Binary file not shown.
+2
-1
@@ -7,8 +7,9 @@ class User(UserMixin, db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
username = db.Column(db.String(20), unique=True, nullable=False)
|
||||
password = db.Column(db.String(255), nullable=False) # <- größer!
|
||||
email = db.Column(db.String(120), unique=True, nullable=False)
|
||||
email = db.Column(db.String(120), unique=True, nullable=True)
|
||||
created_at = db.Column(db.DateTime, server_default=db.func.now())
|
||||
last_login = db.Column(db.DateTime)
|
||||
|
||||
def __repr__(self):
|
||||
return f"<User {self.username}>"
|
||||
|
||||
Reference in New Issue
Block a user