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 trialShana HT
3,292 PointsTemplate does not exist error
I have been working along side the course but building the project in Pycharm. I ran into this error, and not sure how to go about resolving it. Any clues?
TemplateDoesNotExist at /
home.html
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.10.2
Exception Type: TemplateDoesNotExist
Exception Value:
home.html
Exception Location: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/template/loader.py in get_template, line 25
Python Executable: /Library/Frameworks/Python.framework/Versions/3.5/bin/python3
Python Version: 3.5.2
Python Path:
['/Users/Shana/PycharmProjects/learning_site',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python35.zip',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages']
Server time: Sat, 19 Nov 2016 12:18:51 +0000
I took a screenshot if its easier to read: https://www.dropbox.com/home/Screenshots?preview=Screenshot+2016-11-19+07.36.17.png
1 Answer
Andreas cormack
Python Web Development Techdegree Graduate 33,011 PointsHi Shana
Did you add your templates folder in the settings.py file
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['templates'], # this line
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]