Q:

Django v1.5, TemplateDoesNotExist error

In settings.py I've chosen to run with sqlite3 and name this database database.db.
from blog_app.views import oneView, anotherView
from django.conf.urls import patterns, include, url

urlpatterns = patterns('',
    url(r'^one/$', oneView),
    url(r'^another/$', anotherView),
    # Examples:
    # url(r'^$', 'django_project.views.home', name='home'),
    # url(r'^django_project/', include('django_project.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
)

and my views.py looks like this
# -*- coding:UTF-8 -*-
from django.shortcuts import render_to_response

def oneView(request):
    return render_to_response("index.html", {"content":"Hello World, from oneView"})

def anotherView(request):
    return render_to_response("index.html", {"content":"Hello Again, from anotherView"})

my dir to the index.html is blog/blog_app/templates/index.html. since by standard the settings.py file says this:
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
#     'django.template.loaders.eggs.Loader',
)

I think it's weird that it says that my index.html file cannot be found. isn't it looking in the correct directory?
nonetheless, I only get a "TemplateDoesNotExist at /one/" error when I try to go to 
127.0.0.1:8000/one/ or 127.0.0.1:8000/another/
any ideas?

A:

Try doing something like this in your settings.py
SETTINGS_PATH = os.path.dirname(__file__)
PROJECT PATH = os.path.join(SETTINGS_PATH, os.pardir)
PROJECT_PATH = os.path.abspath(PROJECT_PATH)
BLOG_PATH = os.path.join(PROJECT_PATH, "blog_app)
TEMPLATES_PATH = os.path.join(BLOG_PATH, "templates")

TEMPLATE_DIRS = (
    TEMPLATES_PATH,
)

The error usually is due to incorrectly configured templates directory

