1👍
✅
Your template directory configuration is incorrect. If you configure just template
, django will search for the files in ./templates
but the files are in ./mb_project/templates
It should be this way:
'TEMPLATES': [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'mb_project/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',
],
},
},
],
Source:stackexchange.com