{% load static %}
<link href="{% static 'css/includes/film_timtable_card.css' %}" rel="stylesheet">
<div class="film_card">

    {% if film.image %}
    <img src="{{ film.image.url }}" class="d-block w-100 film_card_image film_card_item"
         alt="Фотография фильма не найдена">
    {% else %}
    <p class="no-image-msg">Картинки нет :(</p>
    {% endif %}
    <div class="film_card_column">
        <div class="film_card_title_row">
            <label class="film_title">{{ film.name }}</label>
            <span class="age_limit">{{ film.age_limit }}</span>
            <span class="film_duration">{{ film.duration }}мин.</span>
            <div class="countries_block">
                {% for country in film.countries.all %}
                <div class="countries">
                    <span>{{ country }}</span>
                </div>
                {% endfor %}
            </div>
        </div>
        <div class="film_card_row">
            {% for time_sessions in session %}
            <a class="film_session" href={% url 'time_table:session' sess_id=time_sessions.id %}>
            <div class="session_time">{{ time_sessions.start_datetime|time:"H:i" }}</div>
            </a>
            {% endfor %}
        </div>
        <div class="film_card_footer">
            {% for genre in film.genres.all %}
            <div class="badge text-bg-secondary genre">{{genre.name}}</div>
            {% endfor %}
        </div>
    </div>
</div>