CHSCodeForChange / Sapphire-Web

The website/backend repository for Sapphire, a platform to help organizations manage volunteers.
https://sapphire-web.herokuapp.com
GNU General Public License v3.0
8 stars 2 forks source link

Redirect user if on nonexistent page #28

Closed armaangoel78 closed 6 years ago

armaangoel78 commented 6 years ago

Whenever you go to a page that doesn't exist, it currently just gives you an error. We should really make it so that users are redirected, either to a page that does exist (like if you try to view a slot that doesn't exist you are brought to the slotNeeds page) or to a customized 404 page so it looks not terrible

jpaav commented 6 years ago

Here's a resource for doing this.

jpaav commented 6 years ago

I've fixed this and added the necessary resources and code. In order to see the 404 and 500 error pages, you have to go into settings and set DEBUG=True and ALLOWED_HOSTS to the commented out version. This is because you can either have the error messages for errors or 404 pages, not both. When we set up the production server, it will render the 404 pages.