Django Can't Find My Templates

I was faced to the same problem. The mistake in my case was, that the 'app' was not in the INSTALLED_APPS list at the project settings.py file.

The error raise an error message they suggests similar error.

line 25, in get_template TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: authControll/index.html

settings.py --> Application definition

INSTALLED_APPS = [
    ...,
    'authControll'
]

You must use absolute paths in the TEMPLATE_DIRS setting.

Convenient thing to do, at the top of your settings, insert:

import os
DIRNAME = os.path.abspath(os.path.dirname(__file__))

Then anywhere you use a path, use os.path.join. Example, your TEMPLATE_DIRS would become:

TEMPLATE_DIRS = (
    os.path.join(DIRNAME, 'site-templates/'),
)

Django has a sort of patterns and philosophy. Try to use the same configurations other wise you have to change the core patterns in django.

The pattern for templates in django are like this:

polls/templates/polls/index.html

But to use it you have to add the installed app at the configs:

INSTALLED_APPS = [
'polls.apps.PollsConfig', #<-- Here this shoud be solve it
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',]

For more information look at:

https://docs.djangoproject.com/en/3.0/intro/tutorial02/#activating-models