mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 11:19:57 +00:00
Added login functionality and login required
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from application import db, app
|
||||
from application.dashboard.models import AllowedPlate, LoggedItem, datetime
|
||||
from application.auth.models import User
|
||||
|
||||
with app.app_context():
|
||||
AllowedPlate.query.delete()
|
||||
@@ -11,3 +12,8 @@ with app.app_context():
|
||||
db.session.add(LoggedItem("MUN389", datetime.now(), True))
|
||||
db.session.add(LoggedItem("MUN389", datetime.now(), False))
|
||||
db.session.commit()
|
||||
|
||||
with app.app_context():
|
||||
User.query.delete()
|
||||
db.session.add(User(username="admin", password="admin"))
|
||||
db.session.commit()
|
||||
|
||||
Reference in New Issue
Block a user