<div class="form-control bootstrap-tags">
	<span class="labels">
	{% for val in value %}
	<span class="label label-default">{{ val }} <a class="remove" href="#"><span class="glyphicon glyphicon-remove"></span></a></span>
	{% endfor %}
	</span>
	<input type="text" class="twitter-typeahead" autocomplete="off">
	<input type="hidden" name="{{ name }}" {% for key, val in attrs.items %}{{ key }}="{{ val }}" {% endfor %}>
	<div style="clear: both;"></div>
</div>

<script type="text/javascript">
$(document).ready(function() {
	$('#{{ attrs.id }}').siblings('.twitter-typeahead').typeahead({
		source: [{% for tag in tags %}'{{ tag }}'{% if not forloop.last %},{% endif %}{% endfor %}],
		updater: typeahead_updater
	});
})
</script>