From b885c2b9b261c077bc9dbd80b18e3841ffed560e Mon Sep 17 00:00:00 2001 From: MarkusJoe Date: Tue, 1 Mar 2022 20:51:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=96=87=E4=BB=B6=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 4 +--- bin/utils/settings.py | 16 ---------------- {bin/static => static}/favicon.ico | Bin {bin/templates => templates}/index.html | 0 {bin/templates => templates}/view.html | 0 5 files changed, 1 insertion(+), 19 deletions(-) rename {bin/static => static}/favicon.ico (100%) rename {bin/templates => templates}/index.html (100%) rename {bin/templates => templates}/view.html (100%) 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