Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
崔为之
elp
Commits
07a805f8
Commit
07a805f8
authored
Nov 21, 2023
by
崔为之
💪🏽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update project
parent
dd275c94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
application/script/cmdline.py
application/script/cmdline.py
+8
-2
No files found.
application/script/cmdline.py
View file @
07a805f8
...
@@ -7,9 +7,10 @@
...
@@ -7,9 +7,10 @@
# @Email : StudentCWZ@outlook.com
# @Email : StudentCWZ@outlook.com
# @Date : 2023/10/29 11:21
# @Date : 2023/10/29 11:21
# @File : cmdline.py
# @File : cmdline.py
# @Description :
# @Description :
Defines the initial command line interface for the Flask application.
"""
"""
# Import third-party modules
import
click
import
click
from
flask.cli
import
with_appcontext
from
flask.cli
import
with_appcontext
...
@@ -17,9 +18,14 @@ from flask.cli import with_appcontext
...
@@ -17,9 +18,14 @@ from flask.cli import with_appcontext
@
click
.
command
(
"init"
)
@
click
.
command
(
"init"
)
@
with_appcontext
@
with_appcontext
def
init
():
def
init
():
"""Create a new log"""
"""
Initialize the application by creating a new log entry.
This command is to be used with the Flask application context.
"""
from
application.extensions.init_sqlalchemy
import
db
from
application.extensions.init_sqlalchemy
import
db
# Uncomment below lines to create a new log entry.
# click.echo("create log")
# click.echo("create log")
# db.session.add(user)
# db.session.add(user)
# db.session.commit()
# db.session.commit()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment