Reputation: 16808
I have this templates structure:
dir1: base.html dir2: template.html
template.html must extend base.html:
{% extends '../dir1/base.html' %}
But it raises error:
Caught TemplateDoesNotExist while rendering: ../dir1/base.html
Upvotes: 3
Views: 5248
Reputation: 42228
You should set template dir (https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs) in settings.py and then use {% extends 'dir/base.html' %}
.
Upvotes: 7