How i can use nested include and block tag in django templates?

Viewed 14

I want to show list of books in page. But below code does not do it.

base.html
<!DOCTYPE html>
<html lang="en">
    <head>
    </head>
    <body>
        {% include 'core/main.html' %}
    </body>
</html>
main.html
<main class="container">
    <div class="wrapper">
        {% block main %}
        {% endblock %}
    </div>
</main>
books.html
{% extends 'core/base.html' %}
{% block main %}
    Books    
{% endblock %}
0 Answers
Related