{% extends 'current_session/user/layout.html' %} {% block title %}Session{% endblock %} {% block content %}
{% if getSessionName: %}

{{getSessionName[0].dt.strftime('%d-%m-%Y')}} [{{getSessionName[0].hall}}]

{% set is_active_session = namespace(val=0) %} {% set active_style = namespace(val=0) %} {% for session_data in getSessionName %} {% if session_data.is_active|int == 1 : %} {% set is_active_session.val = 1 %} {% endif %} {% endfor %} {% for session_data in getSessionName %} {% if session_data.is_active|int == 1 : %} {% set active_style.val = "active" %} {% else %} {% set active_style.val = "" %} {% endif %}
{{session_data.session_name}}
{%if session_data.session_name != 'No Active Session' %} [{{session_data.starts_by.strftime('%H:%M')}} - {{session_data.ends_by.strftime('%H:%M')}} ]{% endif %}
{% endfor %}
{% endif %}
{% endblock %} {% block script %} {% endblock %}