Forums

TemplateDoesNotExist: old django 1.3.1 project don't find admin templates

This project in local works ok, but deploying here don't search templates in the /home/heysi/.virtualenvs/heysiweb_venv/django/contrib/admin then:

TemplateDoesNotExist at /admin/

admin/login.html

Request Method:     GET
Request URL:    http://heysi.pythonanywhere.com/admin/
Django Version:     1.3.1
Exception Type:     TemplateDoesNotExist
Exception Value:

admin/login.html

Exception Location:     /home/heysi/.virtualenvs/heysiweb_venv/local/lib/python2.7/site-packages/django/template/loader.py in find_template, line 138
Python Executable:  /usr/local/bin/uwsgi
Python Version:     2.7.12
Python Path:

['./heysiweb',
 '/var/www',

Django tried loading these templates, in this order:

Using loader django.template.loaders.filesystem.Loader:
    /home/heysi/heysiweb/templates/admin/login.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
    /home/heysi/heysiweb/django_wysiwyg/templates/admin/login.html (File does not exist)
    /home/heysi/heysiweb/tinymce/templates/admin/login.html (File does not exist)

don't search in the : /home/heysi/.virtualenvs/heysiweb_venv/django/contrib/admin/templates

my web app config:

What your site is running.
Source code:
/home/heysi/heysiweb/   Go to directory
Working directory:
/home/heysi/   Go to directory
WSGI configuration file:
/var/www/heysi_pythonanywhere_com_wsgi.py
Python version:
2.7

Virtuanenv:
/home/heysi/.virtualenvs/heysiweb_venv

Static files:
/static/    /home/heysi/heysiweb/static/

Some help?

That sounds like there's a problem with your virtualenv -- it doesn't include the templates. Did you get any errors while you were creating it?

nop, I not get any error creating viertualenv the output is like: https://help.pythonanywhere.com/pages/Virtualenvs EDIT: I solved adding to settings.py

TEMPLATE_DIRS = (
   os.path.join(PROJECT_PATH, 'templates'),
    '/home/heysi/.virtualenvs/heysiweb_venv/django/contrib/admin/templates', #****THIS LINE
 )

but I think, that is not best practice...

I agree, that's not what you'd normally expect to have to do. What do you have in your TEMPLATE_LOADERS setting?