<table {% for key, value in table_view.html_arguments.items() %} {{key}}="{{value}}" {% endfor %}></table>
<script>
    $(function () {
        var table = $("{{ table_view.html_arguments['id'] }}").DataTable({
            {% for key, value in table_view.datatable_arguments.items() %}
                {{key}}: {{value}},
            {% endfor %}
            columns: [
            {% for column in table_view.columns %}
                {
                    title : "{{ column.column_name }}",
                    data: "{{ column.data_name }}",
                    name: "{{ column.data_name }}",
                    target: {{ loop.index0 }},
                    className: "{{ column.filter_type + ' ' + column.data_name }}"
                },
            {% endfor %}
            ]
        });
        buildFilters(table)
    });

    {% include "js/table.js" %}
</script>