feature: 添加静态文件

This commit is contained in:
zhengxinonly
2023-09-29 14:57:03 +08:00
parent 2c3c79b21f
commit ba5e2cf67b
68 changed files with 153780 additions and 5 deletions
+2 -3
View File
@@ -3,6 +3,7 @@ from flask import Flask
from configs import config
from pear_admin.extensions import register_extensions
from pear_admin.orms import UserORM
from pear_admin.views import register_views
def create_app(config_name="dev"):
@@ -12,8 +13,6 @@ def create_app(config_name="dev"):
register_extensions(app)
@app.route("/")
def index():
return "hello pear-admin-flask !"
register_views(app)
return app
+7
View File
@@ -0,0 +1,7 @@
from flask import Flask
from .index import index_bp
def register_views(app: Flask):
app.register_blueprint(index_bp)
+28
View File
@@ -0,0 +1,28 @@
from flask import Blueprint, render_template
index_bp = Blueprint("index", __name__)
@index_bp.route("/")
def index():
return render_template("index.html")
@index_bp.route("/login.html")
def login():
return render_template("login.html")
@index_bp.route("/register.html")
def register():
return render_template("register.html")
@index_bp.route("/view/console/index.html")
def console1():
return render_template("view/console/index.html")
@index_bp.route("/view/analysis/index.html")
def analysis():
return render_template("view/analysis/index.html")