improved 404 page

This commit is contained in:
gpkvt 2023-06-04 12:32:46 +02:00
parent c1d8408cc6
commit b9003c60a6
2 changed files with 9 additions and 2 deletions

View File

@ -64,7 +64,10 @@ def log_the_request(response):
def page_not_found(e):
lang = config.get('i18n', 'lang')
title = config.get('i18n', 'title')
return render_template('404.html', title=title, lang=lang), 404
url = config.get('main', 'base_url')
theme = config.get('main', 'theme')
desc = config.get('i18n', 'desc')
return render_template('404.html', title=title, lang=lang, desc=desc, theme=theme, url=url), 404
@app.route("/")
def hello():

View File

@ -2,7 +2,11 @@
{% block main %}
<div class="ab">
<div class="a">404 - Page not found.</div>
<div class="a">
<h1>404 - Page not found.</h1>
<p>Sorry, the page you requested does not exists.</p>
<p>[<a href="/">Home</a>]</p>
</div>
</div>
<div id="footer">
<div class="empty">&nbsp;</div>