{% load djblets_js %}

{% if js_extension_items %}
<script>
{%  for item in js_extension_items %}
    new {{item.js_extension.model_class}}({
{%   for key, value in item.model_data.items %}
        {{key|json_dumps}}: {{value|json_dumps}},
{%   endfor %}
        id: '{{item.js_extension.extension.id}}',
        name: '{{item.js_extension.extension.info.name|escapejs}}',
        urlName: '{{url_name}}',
        settings: {{item.js_extension.get_settings|json_dumps}}
    });
{%  endfor %}
</script>
{% endif %}
