functionele logs toegevoegd in seed.py AT

This commit is contained in:
Anh-Thy04
2025-05-27 16:01:19 +02:00
parent 8c0877d7eb
commit 42ea35bd47
3 changed files with 13 additions and 7 deletions

View File

@@ -1,7 +1,13 @@
from application import db, app
from application.dashboard.models import AllowedPlate
from application.dashboard.models import AllowedPlate, LoggedItem, datetime
with app.app_context():
AllowedPlate.query.delete()
db.session.add(AllowedPlate("MUN389"))
db.session.commit()
with app.app_context():
LoggedItem.query.delete()
db.session.add(LoggedItem("MUN389", datetime.now(), True))
db.session.add(LoggedItem("MUN389", datetime.now(), False))
db.session.commit()