更新文档

This commit is contained in:
wojiaoyishang
2025-01-27 19:48:27 +08:00
parent 155af93c77
commit 5153daf7da
39 changed files with 767 additions and 593 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ from .main import helloworld_blueprint
dir_path = os.path.dirname(__file__).replace("\\", "/")
folder_name = dir_path[dir_path.rfind("/") + 1:] # 插件文件夹名称
def event_init(app: Flask):
"""初始化完成时会调用这里"""
app.register_blueprint(helloworld_blueprint)
app.register_blueprint(helloworld_blueprint)
+5 -3
View File
@@ -1,10 +1,12 @@
from flask import render_template, Blueprint
# 创建蓝图
helloworld_blueprint = Blueprint('hello_world', __name__, template_folder='templates', static_folder="static",
url_prefix="/hello_world")
helloworld_blueprint = Blueprint('hello_world', __name__,
template_folder='templates',
static_folder="static",
url_prefix="/hello_world")
@helloworld_blueprint.route("/")
def index():
return render_template("helloworld_index.html")