cmdline.py 573 Bytes
Newer Older
Weizhi Cui's avatar
Weizhi Cui committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/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 :
"""

import click
from flask.cli import with_appcontext


@click.command("init")
@with_appcontext
def init():
崔为之's avatar
崔为之 committed
20
    """Create a new log"""
Weizhi Cui's avatar
Weizhi Cui committed
21 22
    from application.extensions.init_sqlalchemy import db

崔为之's avatar
崔为之 committed
23 24 25 26
    # click.echo("create log")
    # db.session.add(user)
    # db.session.commit()
    # click.echo("created log")