Explore Courses Blog Tutorials Interview Questions

Explore Tech Questions and Answers

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

0 votes
by (19.9k points)

Ive got an as it seems common beginners problem.

im working on my first django project and when I set up my view I get an "TemplateDoesNotExist" error. Ive spend lots of hours on this now - and I know theres lots of topics on it but nothing helped me till now.

I hope I can supply all the information needed so an advanced django user can probably directly see what Im doing wrong.

im using the developement server. and windows 7 & sqlite3.

this is the error I get:

TemplateDoesNotExist at /skates/


Request Method: GET

Request URL:

Django Version: 1.4.3

Exception Type: TemplateDoesNotExist

in I set up the TEMPLATE_DIRS like this:




the template loaders looks like this:




#     'django.template.loaders.eggs.Loader',


this is my view:

from django.shortcuts import render_to_response

from django.template import RequestContext

from sk8.models import Sk8

def AllSk8s(request):

    skates      = Sk8.objects.all().order_by('name')

    context     = {'skates':skates}

    return render_to_response('allsk8s.html', context, context_instance=RequestContext(request))

it should link to allsk8s.html - and it looks like it does but the file can not be found although it is definitely in the right folder. but as you can see:

Template-loader postmortem

Django tried loading these templates, in this order:

Using loader django.template.loaders.filesystem.Loader:

H:\netz2\skateprojekt\templates\allsk8s.html (File does not exist)

this is a part of my

    urlpatterns = patterns('',

         url(r'^admin/', include(,

         (r'^skates/$', 'sk8.views.AllSk8s'),


and this is the system path:


and in the templates folder is a file called allsk8s.html so as far as I understood it - this should work. I really hope somebody can help me cause this is the second time I ran into a problem like this and I can not figure out the problem.

1 Answer

0 votes
by (25.1k points)

One of the solution to this problem is you should add apps to in I assume you have an application named such as invoice then solution to this is










Related questions

Browse Categories