I get this error when trying to go to my Django app's admin panel:
TemplateDoesNotExist at /admin/index.html
Exception Location: /home/mhb11/.virtualenvs/redditpk/local/lib/python2.7/site-packages/django/template/loader.py in find_template, line 139
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: /home/mhb11/folder/project/templates/admin/index.html (File does not exist) /home/mhb11/.virtualenvs/projectenv/local/lib/python2.7/site-packages/bootstrap_pagination/templates/admin/index.html (File does not exist)
I have a new Django installation, haven't moved any files, and settings.py has django.contrib.admin
added in INSTALLED_APPS.
If I go to /.virtualenvs/projectenv/local/lib/python2.7/site-packages/django/contrib/admin/
I do NOT find a /templates/
folder there (which would contained index.html and a bunch of other files).
However, exactly the same project, installed in a different machine DOES HAVE that /templates/
folder. I uninstalled and reinstalled Django in my virtual environment, but to no avail.
Installed apps in settings.py has the following:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
#'django.contrib.sessions',
'user_sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.comments',
'myapp',
'myproject',
'south',
'registration',
'bootstrap_pagination',
'djcelery',
'tweepy',
'django.contrib.humanize',
'analytical',
'mathfilters',
#'request',
#'debug_toolbar',
#'analytical',
#'django_whoshere',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
And the full trace of the error I get is:
Internal Server Error: /admin/ Traceback (most recent call last): File "/home/mhb11/.virtualenvs/projectenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 140, in get_response
response = response.render() File "/home/mhb11/.virtualenvs/projectenv/local/lib/python2.7/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content File "/home/mhb11/.virtualenvs/projectenv/local/lib/python2.7/site-packages/django/template/response.py", line 80, in rendered_content
template = self.resolve_template(self.template_name) File "/home/mhb11/.virtualenvs/projectenv/local/lib/python2.7/site-packages/django/template/response.py", line 58, in resolve_template
return loader.get_template(template) File "/home/mhb11/.virtualenvs/projectenv/local/lib/python2.7/site-packages/django/template/loader.py", line 146, in get_template
template, origin = find_template(template_name) File "/home/mhb11/.virtualenvs/projectenv/local/lib/python2.7/site-packages/django/template/loader.py", line 139, in find_template
raise TemplateDoesNotExist(name) TemplateDoesNotExist: admin/index.html
Have you ever seen anything like it? How do I solve this?