bookwyrm/bookwyrm/views/server_error.py
Wesley Aptekar-Cassels 0b9e4d617e Use context processor for 500 page
By default, Django doesn't run any context processors for server errors,
to make the error path as simple as possible. However, this has the
downside that our template does not load correctly. To fix this, I added
a custom 500 error handler, which will run the context processor.

Fixes: #2736
2023-03-13 03:47:23 -04:00

9 lines
215 B
Python

"""custom 500 handler to enable context processors"""
from django.template.response import TemplateResponse
def server_error(request):
"""server error page"""
return TemplateResponse(request, "500.html")