cardie icon indicating copy to clipboard operation
cardie copied to clipboard

Added Custom 404 and 500 Pages

Open Trishank-K opened this issue 1 year ago • 4 comments

The Error 404 Page: image

The Error 500 Page: image

Trishank-K avatar Oct 02 '24 21:10 Trishank-K

Thanks @Trishank-K!

You had to add those pages to handler404 and handler500 (see docs)

Yes, there's still one more step to this implementation. Is there something I'm meant to review @ar4s? It says you've suggested changes but I can't seem to find them

nfoert avatar Oct 03 '24 19:10 nfoert

It says you've suggested changes but I can't seem to find them

I put my suggestions only in comment :)

Is there something I'm meant to review

No, but I think after merge that I can setup some basic automated tests to check this cases.

ar4s avatar Oct 03 '24 19:10 ar4s

@Trishank-K You had to add those pages to handler404 and handler500 (see docs) without this there are only templates and never display it to user so are worthless.

Hey @ar4s I had read the documentation here: docs

It suggests that by default the application renders a "Not Found" page or "404.html" if present and I've added pages of 404.html and 500.html

On local testing they worked too!

Trishank-K avatar Oct 04 '24 06:10 Trishank-K

@Trishank-K you have right - by default Django is looking for 404.html and 500.html. However you use server_ip, production, username in templates so I thougt you want to pass those variables to the template and only way to pass it was through custom view for 404 and 500. But now you can update this branch with development from upstream and use {{server.ip}} and {{server.production}} due to https://github.com/nfoert/cardie/pull/64.

ar4s avatar Oct 04 '24 06:10 ar4s