heel wat changes

This commit is contained in:
DaanoGames
2025-04-15 14:59:25 +02:00
parent eda84d13de
commit 095d7abcd9
6 changed files with 22 additions and 18 deletions

13
seed.py
View File

@@ -24,7 +24,16 @@ new_users = [
),
]
new_services = Service(name="test123", url="http://google.com")
new_services = [
Service(
name="test123",
url="http://google.com",
),
Service(
name="Netflix",
url="https://www.netflix.com",
),
]
with app.app_context():
# Remove all existing
@@ -32,6 +41,6 @@ with app.app_context():
User.query.delete()
db.session.commit()
# Then add new
db.session.add(new_services)
db.session.add_all(new_services)
db.session.add_all(new_users)
db.session.commit()