#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ # @Version : Python 3.11.4 # @Software : Sublime Text 4 # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/29 11:21 # @File : cmdline.py # @Description : Defines the initial command line interface for the Flask application. """ # Import third-party modules import click from flask.cli import with_appcontext @click.command("init") @with_appcontext def init(): """ 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 # Uncomment below lines to create a new log entry. # click.echo("create log") # db.session.add(user) # db.session.commit() # click.echo("created log")