Forums

Django - Custom 404 page not showing

Hello all,

I was trying to follow this tutorial exactly: https://wsvincent.com/django-local-404-page/

I wanted to use my own 404 page. I know there's a few posts in the forum about this topic. But none of the ones I read seem related to this.

Most have their 404 pointed to in URLS.PY. However, like in the tutorial, I used Templates/404.html. It works on my local server, but not on PythonAnywhere.

Does anyone know why? Any wisdom at all would be appreciated.

The 404 for your site seems to be working fine. Did you work out what the problem was?

I would like to know where URLS.py appears. I can't seem to find it.

Please help!

Just add it under the web tab to the static files. Type your path as url like "/folder/xy.html" and as directory "/home/Name/myproject/folder/xy.html". This should work fine.

this sounds like a programming question. you may want to get 1:1 help at Codementor.

Hi all,

Pardon the delay. It's been a busy week.

It seems that the problem has fixed itself. Maybe it took a few minutes for the site to update the correct 404 page. Either way, it works fine now.

Thank you!

Next time I would suggest trying to reload your web app to make sure the newest code changes you made are reflected.

Ah good point, I'll make sure to do that next time!