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 error page #567

Merged
merged 1 commit into from
Jun 22, 2016
Merged

Added custom 404 error page #567

merged 1 commit into from
Jun 22, 2016

Conversation

giocalitri
Copy link
Contributor

@giocalitri giocalitri commented Jun 17, 2016

What are the relevant tickets?

closes #440

What's this PR do?

Adds a custom 404 page

Where should the reviewer start?

probably ui.views and then '404.html'

How should this be manually tested?

to see the the 404 template, just go to /404/.
To actually test that a 404 is returned for a not existing URL, you need to:

  • set the debug to False in your docker-compose.yml
  • run node node_modules/webpack/bin/webpack.js --config webpack.config.prod.js --bail to build the static assets
  • run docker-compose run web ./manage.py collectstatic

Any background context you want to provide?

This story does not address the case the page is not found in the react router

What GIF best describes this PR or how it makes you feel?

@bdero bdero temporarily deployed to micromasters-ci-pr-567 June 17, 2016 15:56 Inactive
@bdero bdero temporarily deployed to micromasters-ci-pr-567 June 20, 2016 15:18 Inactive
context={
"style_src": get_bundle_url(request, "style.js"),
"dashboard_src": get_bundle_url(request, "dashboard.js"),
"js_settings_json": json.dumps(js_settings),
}
)


def handler404(request):
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like handler_404 and page_404 would be more PEP8 compliant, not sure how that treats numbers though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I cannot change the name of handler404: this is the standard way to override the django default one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will change the other one though

@bdero bdero temporarily deployed to micromasters-ci-pr-567 June 20, 2016 19:25 Inactive
@noisecapella noisecapella self-assigned this Jun 22, 2016
@noisecapella
Copy link
Contributor

Looks great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

General 404 page
3 participants