In my home.html page, I am trying to include a header.html file along with extending base.html. Following is my code
{% extends "base.html" %}
{% block body %}
{% include 'header.html' %}
# including the block navigation from header.html
<nav id='header-nav'>{% block nav %} {% endblock %}</nav>
# including the block image from header.html
<div id='header-img'>{% block image %} {% endblock %}</div>
# Reusing the same navigation in footer from header.html
<div id='footer-nav'>{% block nav %} {% endblock %}</div>
{% endblock %}
Home.html looks like the following
{% block image %}<h1>I am image</h1>{% endblock %}
{% block nav %}<h1>I am navigation</h1>{% endblock %}
However, it returns an error - ''block' tag with name 'nav' appears more than once'.
Why is that? Is there any solutions to this?
Regards