diff --git a/main.py b/main.py index e9060fd..c1cdd59 100644 --- a/main.py +++ b/main.py @@ -62,7 +62,7 @@ def catch_all(path): if os.path.isfile('templates/' + path + '.html'): return render_template(path + '.html', year=year) - return redirect('/') + return render_template('404.html', year=year), 404 @app.route('/vote') def vote(): @@ -177,7 +177,7 @@ def send_discord_message(data): # 404 catch all @app.errorhandler(404) def not_found(e): - return redirect('/') + return render_template('404.html', year=datetime.datetime.now().year), 404 if __name__ == '__main__': diff --git a/templates/404.html b/templates/404.html index 4ada4ef..5fb4356 100644 --- a/templates/404.html +++ b/templates/404.html @@ -28,13 +28,7 @@
@@ -42,7 +36,6 @@

Page Not Found

-

Fusce adipiscing sit, torquent porta pulvinar.

diff --git a/templates/index.html b/templates/index.html index 112a557..c9ab3ff 100644 --- a/templates/index.html +++ b/templates/index.html @@ -36,13 +36,7 @@
diff --git a/templates/success.html b/templates/success.html index 26b9463..ad8a78d 100644 --- a/templates/success.html +++ b/templates/success.html @@ -28,13 +28,7 @@