shaare.it

TemplateNotFound: base.html

7 Dec 2025

1 min read

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.html in templates/ and ensure blueprint template folders are configured.

Wrong code

{% extends 'layouts/base.html' %}
<!-- no such path -->

Fixed code

{% extends 'base.html' %}