tags:

views:

117

answers:

1

Hey all,

I'm in the middle of putting up my first django application on shared hosting. This should be an easy thing, but I am just not seeing it.

I tried to follow the directions of the django documentation, and created a 404.html page within my template folder. I just wrote "This is a 404 page." in the .html file. I also did the same thing for a 500.html page and wrote in it "This is a 500 page."

However when I hit a 'bad page' I get a standard 404 page from the browser (Oops! This link appears to be broken. in Chrome) when I would expect "This is a 404 page."

What's even more interesting is out of frustration I wrote {% asdfjasdf %} in the 404.html, and instead of getting the "Oops!..." error I get "This is a 500 page," so it definitely sees the 404.html template.

Here's what I can confirm:

  • Debug = False
  • I am running apache on a shared hosting
  • I have not done anything special with .htaccess and 404 errors.
  • If I run with Debug = True, it says it's a 404 error.
  • I am using FastCGI

Anything else anyone think I could try?

Thank you very much!

+1  A: 

See this related question: http://stackoverflow.com/questions/2584647/django-404-pages-not-appearing

I don't think this has to do with your setup. Chrome is hijacking the 404 page and showing the 'Oops' message. I would expect that if you tried to view the 404 page in another browser you would see it as expected.

Mark Lavin
Oddly enough IE hijacked it as well, so I didn't think that was the problem. I tried Firefox and it seems to be working, so that must be the problem. Thanks!
Matthew Doyle
Annotation: Chrome does display 404 pages, if they are greater than 512 bytes in size.
schneck