Skip to content

Commit

Permalink
add a 404 error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
bbolli committed Dec 22, 2023
1 parent 317aaf5 commit 5a87c48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
request,
url_for,
)
import werkzeug.exceptions

from theses import theses

Expand Down Expand Up @@ -66,5 +67,10 @@ def about():
return render_template('about.html')


@app.errorhandler(werkzeug.exceptions.NotFound)
def handle_not_found(e):
return thesis(404)


if __name__ == '__main__':
app.run()

0 comments on commit 5a87c48

Please sign in to comment.