diff --git a/app.py b/app.py index f92a14b..87fb8ea 100644 --- a/app.py +++ b/app.py @@ -25,9 +25,7 @@ if conf.type == 'MySQL': else: from bin.db.db import SQLite as db -app = Flask(__name__, - static_folder='bin/static', - template_folder='bin/templates') +app = Flask(__name__, static_url_path='') app.config['JSON_SORT_KEYS'] = False # 设置JSON消息不根据字母顺序重新排序 app.config['JSON_AS_ASCII'] = False # 设置JSON消息显示中文 diff --git a/bin/utils/settings.py b/bin/utils/settings.py index fe6acff..30d5da7 100644 --- a/bin/utils/settings.py +++ b/bin/utils/settings.py @@ -58,22 +58,6 @@ class Settings: """ return self.__database['type'] - @property - def path(self) -> str: - """ - 数据库路径 - :return: - """ - return self.__database['SQLite']['path'] - - @property - def name(self) -> str: - """ - 数据库名称 - :return: - """ - return self.__database['SQLite']['path'].split('/')[-1] - @property def mysql_host(self) -> str: """ diff --git a/bin/static/favicon.ico b/static/favicon.ico similarity index 100% rename from bin/static/favicon.ico rename to static/favicon.ico diff --git a/bin/templates/index.html b/templates/index.html similarity index 100% rename from bin/templates/index.html rename to templates/index.html diff --git a/bin/templates/view.html b/templates/view.html similarity index 100% rename from bin/templates/view.html rename to templates/view.html