mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
14 lines
363 B
Python
14 lines
363 B
Python
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,
|
|
}
|