Skip to content
Advertisement

Tag: django-templates

What is the path that Django uses for locating and loading templates?

I’m following this tutorial on a Windows 7 environment. My settings file has this definition: I got the base_template from the template admin/base_site.html from within the default Django admin template directory in the source code of Django itself (django/contrib/admin/templates) into an admin subdirectory of myapp directory as the tutorial instructed, but it doesn’t seem to take affect for some reason.

Django TemplateDoesNotExist?

My local machine is running Python 2.5 and Nginx on Ubuntu 8.10, with Django builded from latest development trunk. For every URL I request, it throws: TemplateDoesNotExist at /appname/path appname/template_name.html Django tried loading these templates, in this order: * Using loader django.template.loaders.filesystem.function: * Using loader django.template.loaders.app_directories.function: TEMPLATE_DIRS (‘/usr/lib/python2.5/site-packages/projectname/templates’,) Is it looking for /usr/lib/python2.5/site-packages/projectname/templates/appname/template_name.html in this case? The weird thing is

Advertisement