{% load djblets_js %}

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