Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting TemplateDoesNotExist error in django 1.9

Tags:

I am facing strange very issue today. I am getting TemplateDoesNotExist (see first image) but when I tried to debug the template source with debug-toolbar it is correctly showing the templates path (see image 2) More strangely, when I clicked on specific templates button it is correctly showing the source of template.

This is the first time I am facing such issues. Can someone please explain why I am getting this error.

EDIT: Adding settings.py file(relavant portion)

SETTINGS_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

TEMPLATES = [
{
    'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [os.path.join(SETTINGS_PATH, 'templates')],
    'APP_DIRS': True,
    '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',
        ],
    },
},

]

Thanks

enter image description here

enter image description here)