[Django]-Django Loading Templates with Inheritance from Specific Directory

6👍

In your templates/standard/bishop/browse.html template you’re doing the following:

{% extends "base.html" %}

This refers to templates/base.html and not templates/standard/bishop/base.html. By default Django will check your installed applications as well as the template directories that you specified under TEMPLATE_DIRS in settings.py.

This behavior is specified by TEMPLATE_LOADERS in settings.py:

You might be able to get away with what you’re trying to do by creating your own template loader, otherwise simply specify the actual path to base.html:

{% extends "standard/bishop/base.html" %}
👤peterp

Leave a comment