django-admin-tools: TemplateDoesNotExist at /admin/ admin:admin/index.html error

Just installed this package, and I get the above error.

Seems that I cannot use {% extends "admin:admin/index.html" %} within the templates.

Any thoughts?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

Django 1.8 > TEMPLATE_LOADERS setting deprecated. You have to use the TEMPLATES dictionary. I think you’re going to want something like:

settings.py

TEMPLATES = [
{
    'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [os.path.join(BASE_DIR, "templates")],
    'OPTIONS': {
        'context_processors': [
            'django.template.context_processors.debug',
            'django.template.context_processors.request',
            'django.contrib.auth.context_processors.auth',
            'django.contrib.messages.context_processors.messages',
        ],
        'loaders':[
            'admin_tools.template_loaders.Loader',
            ('django.template.loaders.cached.Loader', [
            'django.template.loaders.filesystem.Loader',
            'django.template.loaders.app_directories.Loader',
            ]),
        ],
    },
},

]

also note – django 1.8 moved from django.core.context_processors to django.template.context_processors

But have you correctly configured django-admin-tools ?

Since versions 0.7.x, you must add admin_tools.template_loaders.Loader to your template loaders as stated in the release notes and in the documentation.