{% extends "base.html" %}

{% block head %}{% include "base/head.html" with title='Викладачі' %}{% endblock %}
{% block navbar %}{% include "base/navbar.html" with active_page="teacher_list" %}{% endblock %}

{% block content %}
<div class="container groupName">
        <h2>Викладачі</h2>
</div><!-- /.container -->

<div class="timetable">
    <div class="container">
        {% for teacher in object_list %}
            {% ifchanged teacher.first_letter %}
                {% if forloop.counter != 1 %}
                    <hr>
                {% endif %}

                <h3>{{ teacher.first_letter }}</h3>
           {% endifchanged %}
           <div class="oneTeacher"><a href="{% url 'teacher_detail' teacher.id %}">{{ teacher.name }}</a></div>
        {% endfor %}
    </div>
</div>
{% endblock %}
{% extends "base.html" %}

{% block head %}{% include "base/head.html" with title='Викладачі' %}{% endblock %}
{% block navbar %}{% include "base/navbar.html" with active_page="teacher_list" %}{% endblock %}

{% block content %}
<div class="container groupName">
        <h2>Викладачі</h2>
</div><!-- /.container -->

<div class="timetable">
    <div class="container">
        {% for teacher in object_list %}
            {% if teacher.name != "—" %}
                {% ifchanged teacher.first_letter %}
                    {% if forloop.counter != 1 %}
                        <hr>
                    {% endif %}

                    <h3>{{ teacher.first_letter }}</h3>
               {% endifchanged %}
               <div class="oneTeacher"><a href="{% url 'teacher_detail' teacher.id %}">{{ teacher.name }}</a></div>
            {% endif %}
        {% endfor %}
    </div>
</div>
{% endblock %}
Hide empty teacher from list
Hide empty teacher from list
