From 38dd6686d577b7479d5be4bbbdef7a7f6c0bec01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=92=E9=85=92=E7=9A=84=E6=9D=8E=E7=99=BD?= <670939375@qq.com> Date: Wed, 3 Jul 2024 00:31:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90app.py=E3=80=91=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=8B=A6=E6=88=AA=E5=99=A8=EF=BC=9A=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E8=B7=AF=E5=BE=84=E8=B7=B3=E8=BD=AC404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.py b/app.py index eb13980..6316053 100644 --- a/app.py +++ b/app.py @@ -6,5 +6,9 @@ app = Flask(__name__) def hello_world(): # put application's code here return session.clear() +@app.route('/') +def catch_all(path): + return render_template('404.html') + if __name__ == '__main__': app.run() \ No newline at end of file