moviewyrm/bookwyrm/views/error.py

13 lines
324 B
Python
Raw Normal View History

2021-03-08 16:49:10 +00:00
""" something has gone amiss """
2021-01-13 20:08:51 +00:00
from django.template.response import TemplateResponse
2021-03-08 16:49:10 +00:00
2021-01-13 20:08:51 +00:00
def server_error_page(request):
2021-03-08 16:49:10 +00:00
""" 500 errors """
return TemplateResponse(request, "error.html", status=500)
2021-01-13 20:08:51 +00:00
def not_found_page(request, _):
2021-03-08 16:49:10 +00:00
""" 404s """
return TemplateResponse(request, "notfound.html", status=404)