'admin/index.html' does not exist

598 views
Skip to first unread message

bobhaugen

unread,
Aug 13, 2015, 9:51:57 AM8/13/15
to Django users

TemplateDoesNotExist at /admin/

admin/index.html

Created a new virtualenvironment.
pip install Django==1.4.21

Pip installs two django directories.
One in the base virtualenv directory (e.g vn/django), another in vn/lib/python2.7/site-packages.

The in the base virtualenv directory has admin/templates, the one under site-packages does not.

This is different from previous installations, which only had django under site-packages, with the admin/templates.

We're running in Ubuntu 14.04. pip --version 7.1.0

This is a different (newer) version of pip than we've used before. Anybody seen this behavior?

More details:

Request Method:GET
Request URL:http://127.0.0.1:8000/admin/
Django Version:1.4.21
Exception Type:TemplateDoesNotExist
Exception Value:
admin/index.html
Exception Location:/home/lynn/Envs/vn/local/lib/python2.7/site-packages/django/template/loader.py in select_template, line 193
Python Executable:/home/lynn/Envs/vn/bin/python
Python Version:2.7.6
Python Path:
['/home/lynn/Envs/vn/valuenetwork',
 '/home/lynn/Envs/vn/lib/python2.7',
 '/home/lynn/Envs/vn/lib/python2.7/plat-x86_64-linux-gnu',
 '/home/lynn/Envs/vn/lib/python2.7/lib-tk',
 '/home/lynn/Envs/vn/lib/python2.7/lib-old',
 '/home/lynn/Envs/vn/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/home/lynn/Envs/vn/local/lib/python2.7/site-packages',
 '/usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg',
 '/usr/local/lib/python2.7/site-packages',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']
Server time:Thu, 13 Aug 2015 13:13:08 +0000

Template-loader postmortem

Django tried loading these templates, in this order:

  • Using loader django.template.loaders.filesystem.Loader:
    • /home/lynn/Envs/vn/valuenetwork/valuenetwork/templates/admin/index.html (File does not exist)
  • Using loader django.template.loaders.app_directories.Loader:
    • /home/lynn/Envs/vn/local/lib/python2.7/site-packages/pinax_theme_bootstrap_account/templates/admin/index.html (File does not exist)
    • /home/lynn/Envs/vn/local/lib/python2.7/site-packages/pinax_theme_bootstrap/templates/admin/index.html (File does not exist)
    • /home/lynn/Envs/vn/local/lib/python2.7/site-packages/django_forms_bootstrap/templates/admin/index.html (File does not exist)
    • /home/lynn/Envs/vn/local/lib/python2.7/site-packages/metron/templates/admin/index.html (File does not exist)
    • /home/lynn/Envs/vn/local/lib/python2.7/site-packages/django_extensions/templates/admin/index.html (File does not exist)
    • /home/lynn/Envs/vn/local/lib/python2.7/site-packages/notification/templates/admin/index.html (File does not exist)
    • /home/lynn/Envs/vn/valuenetwork/valuenetwork/valueaccounting/templates/admin/index.html (File does not exist)

bobhaugen

unread,
Aug 13, 2015, 1:58:56 PM8/13/15
to Django users
Tried another install using pip 7.1.0 on another computer, ubuntu 12.04, and django installed only once, in vn/lib/python2.7/site-packages, with its templates etc intact.

So I don't know what happened the previous time. We just fixed it by moving the files on the 14.04 box, so it's not an urgent problem. But it would still be interesting to learn if anybody else has seen it.
Reply all
Reply to author
Forward
0 new messages