kevinastone/django-api-rest-and-angular

TemplateDoesNotExist for site-packages

Closed this issue · 1 comments

Cannot figure out what's wrong, I have an issue accessing the templates from site-packages.
I tried both with Django==1.7, Django==1.8 didn't find any solution.

Django is looking for the template at /site-packages/rest_framework/templates/api.html (File does not exist) when the real directory is /site-packages/rest_framework/templates/rest_framework/api.html (File does not exist)

I'm not sure what's the issue.
Thanks (great tutorial by the way :-))

TemplateDoesNotExist at /api
api.html
Request Method: GET
Request URL: http://localhost:8000/api
Django Version: 1.7
Exception Type: TemplateDoesNotExist
Exception Value:
api.html
Exception Location: /Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/site-packages/django/template/loader.py in select_template, line 194
Python Executable: /Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/bin/python
Python Version: 2.7.6
Python Path:
['/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python27.zip',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/plat-darwin',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/plat-mac',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/plat-mac/lib-scriptpackages',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/Extras/lib/python',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/lib-tk',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/lib-old',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/site-packages']
Server time: Wed, 5 Aug 2015 10:50:13 -0700
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:
/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/site-packages/django/contrib/auth/templates/api.html (File does not exist)
/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/site-packages/django_extensions/templates/api.html (File does not exist)
/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/site-packages/rest_framework/templates/api.html (File does not exist)
/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/example/api/templates/api.html (File does not exist)
/Users/joachimhagege/Dropbox/Workspace/Django/django-api-rest-and-angular/env/lib/python2.7/site-packages/django/contrib/admin/templates/api.html (File does not exist)

Closing this since I can't reproduce.