add error pages

This commit is contained in:
Tobias Brunner 2025-02-28 17:19:03 +01:00
parent 43f00dbaa7
commit 6cfbc516f8
No known key found for this signature in database
6 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,16 @@
from django.shortcuts import render
def bad_request(request, exception):
"""400 error handler"""
return render(request, "400.html", status=400)
def page_not_found(request, exception):
"""404 error handler"""
return render(request, "404.html", status=404)
def server_error(request):
"""500 error handler"""
return render(request, "500.html", status=500)