WIP: Use Custom 404 And 500 Templates #271
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ClickUp ticket: https://app.clickup.com/t/8684yagqm
As noted in the ClickUp ticket, the site is currently not defining a template to use for 404 (or a 500) status code responses. As a result, the page for such responses looks not great.
It turns out the code actually has functions for handling 404 and 500 status-code responses, but they weren't hooked up as Django expected, and the templates (404.html and 500.html) didn't exist.
This pull request:
To test locally:
local.py
settings file:To see the 404 page:
To see the 500 page:
apps/hip/views.py
, just below thedef handler404(request, *args, **argv):
line, add something like1/0
, then visit a URL that doesn't existTODO: