Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
戒酒的李白
2024-07-03 00:31:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
38dd6686d577b7479d5be4bbbdef7a7f6c0bec01
38dd6686
1 parent
ef1d471a
【app.py】添加路由拦截器:错误路径跳转404
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
app.py
app.py
View file @
38dd668
...
...
@@ -6,5 +6,9 @@ app = Flask(__name__)
def
hello_world
():
# put application's code here
return
session
.
clear
()
@app.route
(
'/<path:path>'
)
def
catch_all
(
path
):
return
render_template
(
'404.html'
)
if
__name__
==
'__main__'
:
app
.
run
()
\ No newline at end of file
...
...
Please
register
or
login
to post a comment