1 Star 0 Fork 0

Iven/CTFd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
manage.py 646 Bytes
一键复制 编辑 原始数据 按行查看 历史
Kevin Chung 提交于 2020-02-17 02:17 . 2.3.0 (#1248)
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from CTFd import create_app
from CTFd.utils import get_config as get_config_util, set_config as set_config_util
from CTFd.models import *
app = create_app()
manager = Manager(app)
manager.add_command("db", MigrateCommand)
@manager.command
def get_config(key):
with app.app_context():
print(get_config_util(key))
@manager.command
def set_config(key, value):
with app.app_context():
print(set_config_util(key, value).value)
if __name__ == "__main__":
manager.run()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ivenwings/CTFd.git
[email protected]:ivenwings/CTFd.git
ivenwings
CTFd
CTFd
master

搜索帮助