Skip to content

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

Merged
merged 3 commits into from
Jun 21, 2023
Merged

Added error pages handlers #7

merged 3 commits into from
Jun 21, 2023

Conversation

BrainIsDead
Copy link
Collaborator

The changes made in this PR include:

  • 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.

- 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.
@BrainIsDead BrainIsDead marked this pull request as ready for review June 15, 2023 14:22
@BrainIsDead BrainIsDead requested review from krivard and minhkhul June 15, 2023 14:23
Copy link

@krivard krivard left a 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

<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.">
Copy link

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image
image
image
image

Comment on lines 11 to 13
<title>Not Found 404</title>
<meta content="Not Found 404" name="description">
<meta content="HTML, CSS, JavaScript" name="keywords">
Copy link

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?

Copy link
Collaborator Author

@BrainIsDead BrainIsDead Jun 20, 2023

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
Copy link

@krivard krivard left a 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?

@BrainIsDead
Copy link
Collaborator Author

This PR now includes almost a thousand files; was that intentional?

This PR now includes almost a thousand files; was that intentional?

I haven't pushed assets directory before, it includes files needed for bootstrap

Copy link

@krivard krivard left a comment

Choose a reason for hiding this comment

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

👍

@BrainIsDead BrainIsDead changed the base branch from SD-16 to development June 21, 2023 11:43
@BrainIsDead BrainIsDead merged commit 743743f into development Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants