Reputation: 169
The problem: I have a file base.html
, where I have a {% block content %}
, for the page's content and a {% inlcude %}
, for the navigation bar (bootstrap) of the base template. But the include does not find the Template (TemplateDoesNotExist
) and I am sure I didn't spell it wrong. Do I have to provide anything for the template to be found or what?
base.html important content:
<body>
{% include "navbar.html" %}
<div>
{% block content %}
{% endblock %}
</div>
</body>
Some important information: I downloaded bootstrap in the base.html file; base.html and navbar.html are in the same folder.
Upvotes: 0
Views: 44
Reputation: 2019
Since in your directory structure, you have home directory inside templates. Please change code as per below :
<body>
{% include "home/navbar.html" %}
<div>
{% block content %}
{% endblock %}
</div>
</body>
Upvotes: 2