12 lines
400 B
Python
12 lines
400 B
Python
from app import create_app, db
|
|
from app.models import User
|
|
|
|
app = create_app()
|
|
|
|
with app.app_context():
|
|
# Add only the superadmin user
|
|
user = User(username='superadmin', password='superadmin123', role='superadmin')
|
|
if not User.query.filter_by(username=user.username).first():
|
|
db.session.add(user)
|
|
db.session.commit()
|
|
print("Database seeded with only the superadmin user.") |