1

So previously, I was using django-1.8 version & I am in the process of upgrading to django-1.11. When I load my /admin page, I get

Exception Type: TemplateDoesNotExist
Exception Value:    admin/index.html

I have tried multiple options and dont know why django is not loading admin templates for django-1.11.

Few more details: - I use django-jet for the admin interface - My TEMPLATES in settings looks like this:

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
          os.path.join(BASE_DIR, 'custom_dir_1'),
          os.path.join(BASE_DIR, 'custom_dir_2'),
          os.path.join(BASE_DIR, 'custom_dir_3')
        ],
        'OPTIONS': {
            'context_processors': [
              'django.contrib.auth.context_processors.auth',
              'django.template.context_processors.request',
              'django.template.context_processors.i18n',
              'django.contrib.messages.context_processors.messages',
              'context_processors.base_context',
            ],
        }
    }
]

Let me know if I can provide any other information to debug better. Any guidance in this issue is super appreciated, Have been at this issue for 3rd consecutive day :-(

niraj
  • 17,498
  • 4
  • 33
  • 48
doubleo
  • 4,389
  • 4
  • 16
  • 19

1 Answers1

1

You must set APP_DIRS to True, i.e.:

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'APP_DIRS': True,
        'DIRS': [
        ...
Selcuk
  • 57,004
  • 12
  • 102
  • 110