{% load compress %}
{% compress js %}
    <script src="{{ STATIC_URL }}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>
