Skip to content

TemplateDoesNotExist for site-packages #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jhagege opened this issue Aug 5, 2015 · 1 comment
Closed

TemplateDoesNotExist for site-packages #20

jhagege opened this issue Aug 5, 2015 · 1 comment

Comments

@jhagege
Copy link

jhagege commented Aug 5, 2015

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)

@kevinastone
Copy link
Owner

Closing this since I can't reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants