Reputation: 183
I am using django-cms app in my django project. I encountered the following error without any significant changes I made.
Exception Type: TemplateDoesNotExist
Exception Value: cms/new.html
I checked the presence of django-cms installed in the site-packages dir, also found the 'new.html' file in its right place in the app. Moreover, I found this line, in the django debug page, which puzzled me much:
Using loader django.template.loaders.app_directories.Loader:
.......
/usr/local/lib/python2.7/site-packages/cms/templates/cms/new.html (File exists)
.......
according to this line, it is supposed that django has already found the template. So, what is wrong?
Upvotes: 2
Views: 3335
Reputation: 1135
two ways: first,make sure you have put your app in the settings
INSTALLED_APPS = (
'mysite',
# ...... the rest of installed apps
)
second, you can directly set TEMPLATE_DIRS
TEMPLATE_DIRS = (
'/mysite/templates',
)
Upvotes: 0
Reputation: 712
This directory does not seems to be a Django template dir.
In your settings.py file, there is a definition of TEMPLATE_DIR var:
For instance:
TEMPLATE_DIRS = (
ROOT_PATH = '/template',
)
You should put here the right directory, containing your "new.html" template file.
Upvotes: 0
Reputation: 53981
You have to copy it from the django-cms folder into you projects template directory.
Upvotes: 2