Commit cdf75ced authored by Marcus Andersson's avatar Marcus Andersson Committed by Kevin Morris
Browse files

Adding error 404 catcher

parent 82f3871a
from aurweb.templates import make_context, render_template
from aurweb import l10n
async def not_found(request, exc):
_ = l10n.get_translator_for_request(request)
context = make_context(request, f"404 - {_('Page Not Found')}")
return render_template("errors/404.html", context)
# Maps HTTP errors to functions
exceptions = {
404: not_found,
}
{% extends 'partials/layout.html' %}
{% block pageContent %}
<div class="box 404">
<h2>404 - {% trans %}Page Not Found{% endtrans %}</h2>
<p>{% trans %}Sorry, the page you've requested does not exist.{% endtrans %}</p>
</div>
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment