TemplateNotFound: base.html
TemplateNotFound: base.html
$ flask run
Traceback (most recent call last):
...
jinja2.exceptions.TemplateNotFound: base.html
Why this happens
The layout template isn’t in the templates/ folder or the inheritance path ({% extends 'base.html' %}) points to a wrong location.
Fix
- Place
base.htmlintemplates/and ensure blueprint template folders are configured.
Wrong code
{% extends 'layouts/base.html' %}
<!-- no such path -->
Fixed code
{% extends 'base.html' %}