Commit 2a7ada74 authored by 崔为之's avatar 崔为之 💪🏽

Update project

parent d3969b3c
...@@ -39,6 +39,6 @@ Redis: ...@@ -39,6 +39,6 @@ Redis:
DB: 13 DB: 13
Scheduler: Scheduler:
Start: 2023-11-11 15:20:00 Start: 2023-11-11 15:34:00
End: 2099-11-11 16:00:00 End: 2099-11-11 16:00:00
Timezone: Asia/Shanghai Timezone: Asia/Shanghai
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
# @Description : # @Description :
""" """
from application.extensions.init_sqlalchemy import db
from application.models import User
def task(): def task():
""" """
...@@ -17,4 +20,9 @@ def task(): ...@@ -17,4 +20,9 @@ def task():
:return: None :return: None
""" """
print(1) with db.app.app_context():
print("create user")
user = User(username="CWZ", email="Stu@outlook.com", password="qwe!2345", active=True)
db.session.add(user)
db.session.commit()
print("created user admin")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment