Skip to content
Snippets Groups Projects
Unverified Commit 2d02b2ac authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Use custom caption per error.

parent 3b6dbb89
No related branches found
No related tags found
1 merge request!25Use custom caption per error.
......@@ -20,12 +20,13 @@ def error_handler(status: int) -> Callable[..., HttpResponse]:
context = {}
context['status'] = status
context['caption'] = _('Page not found')
context['admins'] = settings.ADMINS
if status == 404:
context['message'] = _('This page does not exist. If you were redirected by a link on an external page, it is possible that that link was outdated.')
context['caption'] = _('Page not found')
elif status == 500:
context['caption'] = _('Internal server error')
context['message'] = _('An unexpected error has occurred.')
return render(request, 'error.html', context, status=status)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment