[Fixed]-TemplateDoesNotExist error in django

1👍

Found that your DIRS in TEMPLATES setting is blank.

Have you tried to declare your templates folder inside the TEMPLATES instead of using TEMPLATE_DIRS = (
os.path.join(MAIN_DIR, 'templates'),
)
?

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            os.path.join(MAIN_DIR, 'templates'),
        ],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.core.context_processors.i18n',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]
👤Sinux

Leave a comment