-
Notifications
You must be signed in to change notification settings - Fork 0
Added error pages handlers #7
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
Conversation
- Added BadRequestErrorView, ForbiddenErrorView, NotFoundErrorView, and InternalServerErrorView classes to base/views.py - Modified signal_documentation/urls.py to include the error views as handlers for HTTP errors - Added 400.html, 403.html, 404.html, and 500.html templates to the templates directory - Added error.html template to the templates directory as a base for all error pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just questions for now
src/templates/400.html
Outdated
<h1>400</h1> | ||
<h2>Bad Request.</h2> | ||
<a class="btn" href="{% url 'signals' %}">Back to home</a> | ||
<img src="{% static 'assets/img/not-found.svg' %}" class="img-fluid py-5" alt="Bad Request."> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the assets/img/not-found.svg
image look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/templates/error.html
Outdated
<title>Not Found 404</title> | ||
<meta content="Not Found 404" name="description"> | ||
<meta content="HTML, CSS, JavaScript" name="keywords"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check my understanding:
No matter what the error is (404, but also 400, 403, and 500) the title and metadata will say 404?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made meta empty
- Modified src/templates/400.html to update the image source for bad request error - Modified src/templates/403.html to update the image source for forbidden error - Modified src/templates/500.html to update the image source for internal server error - Modified src/templates/error.html to remove title and meta description and keywords
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR now includes almost a thousand files; was that intentional?
I haven't pushed assets directory before, it includes files needed for bootstrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
The changes made in this PR include: