This commit is contained in:
parent
42b85441ae
commit
a990123c79
4
main.py
4
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__':
|
||||
|
@ -28,13 +28,7 @@
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-md fixed-top navbar-shrink py-3 navbar-light" id="mainNav">
|
||||
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><span>Nathan.Woodburn/</span></a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navcol-1"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navcol-1">
|
||||
<ul class="navbar-nav mx-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="https://nathan.woodburn.au">Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><span>Nathan.Woodburn/</span></a><button class="navbar-toggler" data-bs-toggle="collapse"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button></div>
|
||||
</nav>
|
||||
<section class="py-5 mt-5">
|
||||
<div class="container">
|
||||
@ -42,7 +36,6 @@
|
||||
<div class="col-md-10 text-center"><img class="img-fluid w-100" src="assets/img/illustrations/404.svg"></div>
|
||||
<div class="col text-center">
|
||||
<h2 class="display-3 fw-bold mb-4">Page Not Found</h2>
|
||||
<p class="fs-4 text-muted">Fusce adipiscing sit, torquent porta pulvinar.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -36,13 +36,7 @@
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-md fixed-top navbar-shrink py-3 navbar-light" id="mainNav">
|
||||
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><span>Nathan.Woodburn/</span></a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navcol-1"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navcol-1">
|
||||
<ul class="navbar-nav mx-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="https://nathan.woodburn.au">Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><span>Nathan.Woodburn/</span></a><button class="navbar-toggler" data-bs-toggle="collapse"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button></div>
|
||||
</nav>
|
||||
<header class="pt-5">
|
||||
<div class="container pt-4 pt-xl-5">
|
||||
|
@ -28,13 +28,7 @@
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-md fixed-top navbar-shrink py-3 navbar-light" id="mainNav">
|
||||
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><span>Nathan.Woodburn/</span></a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navcol-1"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navcol-1">
|
||||
<ul class="navbar-nav mx-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="https://nathan.woodburn.au">Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><span>Nathan.Woodburn/</span></a><button class="navbar-toggler" data-bs-toggle="collapse"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button></div>
|
||||
</nav>
|
||||
<header class="pt-5">
|
||||
<div class="container pt-4 pt-xl-5">
|
||||
|
Loading…
Reference in New Issue
Block a user