views:

47

answers:

3

I want to use my own page for 500 errors. So I've put a 500.html in my templates root directory. But when an error occurs the default apache 500 page is displayed. I did the same with the 404.html and this one just works fine.

Has anyone an idea what the problem could be?

A: 
  1. Check that the 500 is definitely being thrown by Django and not actually by Apache, before Django gets a look-in. Where, according to the Apache error log, is the 500's root cause?

  2. Check the file permissions on that 500 page (unlikely to be wrong, but still)

  3. DPaste your 500.html page for us to see if there's anything more complex in it than straight HTML

stevejalim
A: 

By default, django add from django.conf.urls.defaults import * to your urls.py.
Static analysis tools may complain about it, but if you change it to import only the names you really use (e.g. patterns and include) you will end up breaking the mechanism Django uses to handle errors - and for instance it will not display 500 errors.

Roberto Liffredo
A: 

Hi, I'm the author of the question, but now registered.

I checked everything you told but there is no positive result.

Here is the source of the 500.html, not really complex I think. http://dpaste.com/243272/

Any ideas?

adnek