<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4">
    <div class="container-fluid">
        <a class="navbar-brand" href="#">
            Django Crud Views
        </a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse"
                aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarCollapse">
            <ul class="navbar-nav me-auto mb-2 mb-md-0">
                <li class="nav-item">
                    <a class="nav-link active" aria-current="page" href="{% url "index" %}">Home</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url "author-list" %}">Author</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url "foo-list" %}">Foo</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url "campaign-list" %}">Campaign</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url "poly-list" %}">Poly</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url "detail-list" %}">Detail</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url "group-list" %}">Group</a>
                </li>

                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
                       aria-expanded="false">
                        Formsets
                    </a>
                    <ul class="dropdown-menu">
                        <li><a class="dropdown-item" href="{% url "question-list" %}">Question</a></li>
                        <li><a class="dropdown-item" href="{% url "parent-list" %}">Poly Parent</a></li>
                        <li>
                            <hr class="dropdown-divider">
                        </li>
                    </ul>
                </li>

                <li class="nav-item">
                    <a class="nav-link disabled" aria-disabled="true">Disabled</a>
                </li>
            </ul>
            {% if request.user.is_authenticated %}
                <form class="d-flex" action="{% url 'logout' %}" method="post">
                    {% csrf_token %}
                    <button class="btn btn-outline-success" type="submit">Log Out</button>
                </form>
            {% else %}
                <form class="d-flex" action="{% url 'login' %}" method="pet">
                    <button class="btn btn-outline-success" type="submit">Log In</button>
                </form>
            {% endif %}
        </div>
    </div>
</nav>
