Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added custom 404 and 500 templates #415

Merged
merged 3 commits into from
Nov 20, 2020
Merged

Added custom 404 and 500 templates #415

merged 3 commits into from
Nov 20, 2020

Conversation

ajstewart
Copy link
Contributor

@ajstewart ajstewart commented Nov 17, 2020

I've added custom 404 and 500 templates, which I believe are read by default as long as they are named and placed in the templates as I've done. So I think this should just work once in production.

I managed to test it on my debug=True environment by using this technique: https://spapas.github.io/2015/04/29/django-show-404-page/.

I used the 404.html template from sb-admin-2.

Preview of the 500 page:
Screen Shot 2020-11-17 at 11 28 20

Fixes #290.

@ajstewart ajstewart added enhancement New feature or request UI User Interface labels Nov 17, 2020
@github-actions github-actions bot added this to In progress in Pipeline Backlog Nov 17, 2020
@ajstewart ajstewart self-assigned this Nov 18, 2020
@srggrs
Copy link
Contributor

srggrs commented Nov 18, 2020

In production, you would set those pages in the load balancer configuration file.

Copy link
Contributor

@srggrs srggrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments

templates/404.html Outdated Show resolved Hide resolved
templates/404.html Outdated Show resolved Hide resolved
@ajstewart
Copy link
Contributor Author

In production, you would set those pages in the load balancer configuration file.

Hmm ok, so does this need any changing here? What would be the instructions to implement this?

Pipeline Backlog automation moved this from In progress to Reviewer approved Nov 20, 2020
Copy link
Contributor

@srggrs srggrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajstewart
Copy link
Contributor Author

LGTM

So no extra instructions are needed in the README in order to set these up or anything? @srggrs

@srggrs
Copy link
Contributor

srggrs commented Nov 20, 2020

LGTM

So no extra instructions are needed in the README in order to set these up or anything? @srggrs

I'll test how it works and add them directly to the main documentation I'm building

@ajstewart ajstewart merged commit 63773a5 into master Nov 20, 2020
Pipeline Backlog automation moved this from Reviewer approved to Done Nov 20, 2020
@ajstewart ajstewart deleted the issue-290-add-404 branch November 20, 2020 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UI User Interface
Projects
Development

Successfully merging this pull request may close these issues.

Production need 404 page
2 participants