TemplateDoesNotExist at / index.html


I have some problem in my Django project.

I am new to make web application with django. please help me.


This is my directory path,

----index.html(I wonder this files path.)

and my settings.py file include the:



and this is my url.py file

from django.conf.urls import patterns, include, url
from django.contrib import admin

urlpatterns = patterns('app_index.views',
    # Examples:
    url(r'^$', 'home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),

and finally this is my app_index/views.py

from django.template import RequestContext
from django.shortcuts import render_to_response

def home(request):
    return render_to_response('index.html',{},context_instance=RequestContext(request))

so, I want to know where is the right “index.html” file’s path.


Add this in settings.py


move your index.html to templates folder & do this,

    PROJECT_PATH + '/templates/',

Answered By – user2879704

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published