Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Django Basics Django Templates Templates

Can't find templates directory

I am having trouble finding the templates directory after running my code. I get the following error on my page:

TemplateDoesNotExist at /
Request Method: GET
Request URL:
Django Version: 1.7.11
Exception Type: TemplateDoesNotExist
Exception Value:    
Exception Location: /usr/lib/python3/dist-packages/django/template/loader.py in find_template, line 136
Python Executable:  /usr/bin/python3
Python Version: 3.4.2
Python Path:    
Server time:    Sat, 22 Apr 2017 14:27:04 -0400
Template-loader postmortem

Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
Using loader django.template.loaders.app_directories.Loader:
/usr/lib/python3/dist-packages/django/contrib/admin/templates/home.html (File does not exist)
/usr/lib/python3/dist-packages/django/contrib/auth/templates/home.html (File does not exist)
/home/soulji/django-project/learning_site/courses/templates/home.html (File does not exist)

My paths are correct, however I am wondering if this error is due to my django version. The TEMPLATES section did not already exist in the settings.py file, so I added it, and attempted to make a few changes to try to solve this issue (such as removing the OPTIONS field within TEMPLATES). It appears that it just does not look to find the templates directory in the learning_sites directory at all.

All my code is the same as Keven's, with the exception of portions in the settings.py file (which I had to add the missing section mentioned above). If I need to post more of the error I can do that. Any help will be welcome, thanks.

It was my django verson. I upgraded from 1.7.11 to 2.0 (what I found on git). I'm sure this'll break some other features demonstrated in the videos, so we'll see how that works out.