views:

571

answers:

1

I have created a template for 500 http error.

I have insert my template 500.html in:

1) /project/

2) /project/templates/

3) /python2.5/

4) /python2.5/templates/

.

but I always get this error:

TemplateDoesNotExist: 500.html

Same problem for Http 404 error.

WHY ???

+3  A: 

You might need to specify the template directories in settings.py, if you haven't already.

e.g. in my settings.py, I have:

ROOTDIR = os.path.abspath(os.path.dirname(__file__)) 
TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    ROOTDIR + '/logistics/templates',
)
kchau
I already have specified the template directory :(
xRobot
First, try adding this to your template_dirs: C:\Python25\Lib\site-packages\django\contrib\admin\templates\admin and see if that loads the default Django templates at all... And, if it does, then you're not specifying your dirs correctly. Note: my python instance and installed at C:\, change the path to whatever is right for your system.
kchau