0

My setting for TEMPLATE_DIRS is

PATH_PROJECT = os.path.abspath(os.path.dirname(__file__))
TEMPLATE_DIRS = (
                 os.path.join(PATH_PROJECT, 'mytemplates/'),
                 )

but the base_site.html opens from the default position only. I tried to debug with PDB. but while trying to put break point in django/conf/__init__.py, pdb gives the message End Of File. My base_site.html resides in correct folder.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Shh
  • 986
  • 9
  • 18

1 Answers1

0

are you working on Django >= 1.4? In this case the settings file may reside in a subfolder, you should then write the following code:

PATH_PROJECT = os.path.abspath(os.path.join(os.path.dirname(__file__),'..'))
TEMPLATE_DIRS = ( os.path.join(PATH_PROJECT, 'mytemplates/'), )

to check if TEMPLATE_DIRS contains the paths you want, open django shell

python manage.py shell

and write:

from django.conf import settings; print settings.TEMPLATE_DIRS 
furins
  • 4,979
  • 1
  • 39
  • 57
  • Sorry I found my mistake, I was not adding the admin sub folder in spite of a big reminder from tutorial. – Shh Dec 18 '12 at 02:26