KintoneAppBuilder created
This commit is contained in:
26
backend/app/initial_data.py
Normal file
26
backend/app/initial_data.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from app.db.session import get_db
|
||||
from app.db.crud import create_user
|
||||
from app.db.schemas import UserCreate
|
||||
from app.db.session import SessionLocal
|
||||
|
||||
|
||||
def init() -> None:
|
||||
db = SessionLocal()
|
||||
|
||||
create_user(
|
||||
db,
|
||||
UserCreate(
|
||||
email="maxiaozhe@alicorns.co.jp",
|
||||
password="maxz1205",
|
||||
is_active=True,
|
||||
is_superuser=True,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Creating superuser maxiaozhe@alicorns.co.jp")
|
||||
init()
|
||||
print("Superuser created")
|
||||
Reference in New Issue
Block a user