<html>
<head>
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/flick/jquery-ui.css">
    <link href="{{ STATIC_URL }}user_tags/css/jquery.tagit.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>Django User Tags - Test View</h1>
<p>This view should help you to test JavaScript related parts of this app.</p>
<form method="post" action=".">
    {% csrf_token %}
    {{ form.as_p }}
    <input type="submit" value="Submit" />
</form>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ STATIC_URL }}user_tags/js/tag-it.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
$(document).ready(function() {
    $("#id_tags").tagit({
        allowSpaces: true
        ,availableTags: {{ form.tags_tags_values|safe }}
        ,caseSensitive: false
    });
    $("#id_global_tags").tagit({
        allowSpaces: true
        ,availableTags: {{ form.global_tags_tags_values|safe }}
        ,caseSensitive: false
    });
});
</script>
</body>
