{% set section = namespace(section='') %} {% for set in settings %} {% if page == "servers.py" and (set.section == 'monitoring' or set.section == 'rabbitmq') %} {% else %} {% if section.section|string() != set.section|string() %} {% endif %} {% set section.section = set.section %} {% endif %} {% endfor %}

{% if set.section == 'ldap' %} {{ set.section|upper}} {% else %} {{ set.section[0]|upper}}{{set.section[1:] }} {% endif %}