From 0d713bfb8377f5ca9b35f3c17408e950c82c526b Mon Sep 17 00:00:00 2001 From: adiao <1819192616@qq.com> Date: Sat, 7 May 2022 16:20:55 +0800 Subject: [PATCH] Development commit --- app.py | 12 ------------ static/config.py => config.py | 0 static/init.py => init.py | 0 static/app.py | 19 +++++++++++++++++++ static/view1.py | 6 ++++++ static/view2.py | 14 ++++++++++++++ 6 files changed, 39 insertions(+), 12 deletions(-) delete mode 100644 app.py rename static/config.py => config.py (100%) rename static/init.py => init.py (100%) create mode 100644 static/app.py create mode 100644 static/view1.py create mode 100644 static/view2.py diff --git a/app.py b/app.py deleted file mode 100644 index 5d20a01..0000000 --- a/app.py +++ /dev/null @@ -1,12 +0,0 @@ -from flask import Flask - -app = Flask(__name__) - - -@app.route('/') -def hello_world(): # put application's code here - return 'Hello World!' - - -if __name__ == '__main__': - app.run() diff --git a/static/config.py b/config.py similarity index 100% rename from static/config.py rename to config.py diff --git a/static/init.py b/init.py similarity index 100% rename from static/init.py rename to init.py diff --git a/static/app.py b/static/app.py new file mode 100644 index 0000000..d11f465 --- /dev/null +++ b/static/app.py @@ -0,0 +1,19 @@ +from flask import Flask +from config import config +from flask_sqlalchemy import SQLAlchemy + +app = Flask(config['app']) +db = SQLAlchemy(app) + + +@app.route('/kuajbang/msg/&
', staticmethod=['GET', 'POST']) +def hello_world(): # put application's code here + return 'Hello World!' + + +def msg(): + db.create_all() + + +if __name__ == '__main__': + app.run() diff --git a/static/view1.py b/static/view1.py new file mode 100644 index 0000000..2a37769 --- /dev/null +++ b/static/view1.py @@ -0,0 +1,6 @@ +""" +@Project :KuajBang +@File :view1.py +@Author :AiNiSuBing +@Date :2022/5/6 18:50 +""" diff --git a/static/view2.py b/static/view2.py new file mode 100644 index 0000000..64f80f6 --- /dev/null +++ b/static/view2.py @@ -0,0 +1,14 @@ +""" +@Project :KuajBang +@File :view2.py +@Author :AiNiSuBing +@Date :2022/5/6 18:51 +""" +from flask import Blueprint + +login = Blueprint("login", __name__) + + +@app.route('/login', methods=['GET', 'POST']) +def login(): + return "new windows "