How can I remove the navbar in these three parts in my python project?

I am currently trying to build a website with python django. At the moment I am making a dashboard for the website. On the dashboard I want to show three tiles for different menu options. Dashboard

Ignore the content this is just a placeholder for now. As you can see in every part of the dashboard the navbar is included. My code for the dashboard looks like following:

{% extends 'base.html' %}

{% block titel %}Dashboard{% endblock %}

{% block content%}

    <div class="container-fluid">
        <h1 class="fw-bold">Dashboard</h1>
        <div class="row">
            <div class="col-sm-4">
                <div class="card">
                    <div class="card-body" >
                        {% include 'todolist/index.html' %}
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="card">
                    <div class="card-body">
                        {% include 'todolist/index.html' %}
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="card">
                    <div class="card-body">
                        {% include 'todolist/index.html' %}
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}

The base for all the sites are in a extra file called base.html. In this file is also the navbar defined.

How can I prevent that the navbar will be in every part of the dashboard while still using the extends part?

You can put the navbar section in another template rather than having it in the base template. This way you can decide when to use it separetely than the base template.

Back to Top