{% spaceless %}
{% load i18n %}
<thead>
    <tr class='ajax_list_header_row'>
        {% for field in fields %}

            <th {% for attr_name, attr_value in field.th_tag_attrs.items %}{{ attr_name }}='{{ attr_value }}' {% endfor %} {% if field.order_field %}data-order-field='{{ field.order_field }}'{% endif %} >
                <span>{% if field.escape_title %}{{ field.column_title|default_if_none:"" }}{% else %}{{ field.column_title|default_if_none:""|safe }}{% endif %}</span>
            </th>
            
        {% endfor %}
    </tr>
</thead>
{% endspaceless %}