TemplateDoesNotExist: missing template in app
TemplateDoesNotExist: missing template in app
$ python manage.py runserver
...
TemplateDoesNotExist: blog/index.html
Why this happens
Template path isn’t inside configured TEMPLATES['DIRS'] or app directories disabled.
Fix
Enable app dirs and put templates under app/templates/app/.
Wrong code
TEMPLATES = [{
'APP_DIRS': False,
'DIRS': [],
}]
Fixed code
TEMPLATES = [{
'APP_DIRS': True,
'DIRS': [BASE_DIR / 'templates'],
}]