Error “templatedoesnotexist” in Django

Recently I was facing had been facing from the error “templatedoesntexist” in django.  The error looked like:

Template-loader postmortem

Django tried loading these templates, in this order:

  • Using loader django.template.loaders.filesystem.Loader:
    • /home/sandy/account_department/templates/fee_form/form.html (File exists)
  • Using loader django.template.loaders.app_directories.Loader:
    • /usr/local/lib/python2.6/dist-packages/django/contrib/admin/templates/fee_form/form.html (File does not exist

All I could think was my templates are at right positions as described by me in settings.py file and in my views. And also it already was described that template exist at this position. But I could not understand why loaders could not identify it and thus gave the error. All this problem was due to the permissions given on the template file which did not allow the loaders to read the file.

So if you get the template error,  check 2 things:

  • Template is at right location described by you, and
  • Proper permissions are given to the template files.

Thank you………. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s