{% load compress static %}
{% compress js %}
    <script src="{% static 'wagtailadmin/js/vendor/tag-it.js' %}"></script>
{% endcompress %}

{% url 'wagtailadmin_tag_autocomplete' as autocomplete_url %}
<script>
    $(function() {
        $('#id_tags').tagit({
            autocomplete: {source: "{{ autocomplete_url|addslashes }}"}
        });
    });
</script>
