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

Dylan Davenport
PLUS
Dylan Davenport
Courses Plus Student 2,645 Points

Template does not exist?

I have followed the video correctly I believe and when i run my development server http://127.0.0.1:8000/courses I get an error that says Template does not exist. I checked through my files and I cant seem to figure it out. I also get these errors:

Using engine django:

django.template.loaders.app_directories.Loader: /home/dylan/anaconda3/lib/python3.6/site-packages/django/contrib/admin/templates/courses/course_list.html (Source does not exist) django.template.loaders.app_directories.Loader: /home/dylan/anaconda3/lib/python3.6/site-packages/django/contrib/auth/templates/courses/course_list.html (Source does not exist) django.template.loaders.app_directories.Loader: /home/dylan/learning_site/courses/templates/courses/course_list.html (Source does not exist)

Alex Staenke
Alex Staenke
7,324 Points

Hi Dylan,

can you post the code where you call the template? You are probably only missing a small thing.

The error message above tells you where Django is looking for the templates. Look closely at the path /home/dylan/learning_site/courses/templates/courses/course_list.html and compare it to the code where you call the template.

My typical mistake is to write something like 'course_list.html' when I should write 'courses/course_list.html'