I’m trying to extend from a template, and I keep getting the same TemplateDoesNotExist error. All other pages, that don’t extend the base template work (they just have some dummy html)
I did a ls -l and the file exists and all the permissions are idential:
-rw-r--r-- 1 atrus users 1625 Mar 13 13:05 base.html
drwxr-xr-x 2 atrus users 4096 Mar 13 10:50 css
drwxr-xr-x 2 atrus users 4096 Mar 13 10:51 img
-rw-r--r-- 1 atrus users 136 Mar 13 13:14 index.html
-rw-r--r-- 1 atrus users 407 Mar 12 12:16 login.html
-rw-r--r-- 1 atrus users 662 Mar 12 03:21 register.html
-rw-r--r-- 1 atrus users 59 Mar 12 02:41 temp.html
So it’s not a permissions issue, and the file (base.html exists)
My view that I’m calling (index) is simply:
def index(request):
return render_to_response('menu/index.html')
and my index.html is as follows:
{% extends 'base.html' %}
{% block title %}Home{% endblock title %}
{% block content %}
<p>here be content <p>
{% endblock content %}
with the error occurring at the very first line.
My TEMPLATE_DIRS of settings.py is:
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.
'/home/atrus/Dropbox/workspace/menu/menu/templates'
)
It doesn’t look like you have a
menudirectory within you templates folder (assuming that’s where you did thels). Have you tried just doingreturn render_to_response('index.html')Also, as stated in my comment, is your
TEMPLATE_DIRSthe correct file path? I’m not sure if you accidentaly duplicated “menu”