{% load i18n  %}
<h3>{% blocktrans with title as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3>
<ul><li><select style="max-width: 95%" id="ac_{{ spec.field.name }}"
                data-ajax--cache="true"
                data-ajax--delay="250"
                data-ajax--qs="{{ spec.query_string }}"
                data-ajax--param="{{ spec.lookup_kwarg }}"
                data-ajax--type="GET"
                data-ajax--url="{{ spec.url }}"
                data-theme="filter-autocomplete"
                data-app-label="{{ spec.target_opts.app_label }}"
                data-model-name="{{ spec.target_opts.model_name }}"
                data-field-name="{{ spec.target_field.name }}"
                data-allow-clear="true"
                data-placeholder=""
                class="filter-autocomplete ">
    {% for c in choices %}<option selected="selected">{{ c }}</option>{% endfor %}
</select>
    </li>
</ul>
{{ spec.media }}
<script>
    ;(function ($) {
        $('#ac_{{ spec.field.name }}').djangoAdminSelect2();
    })(django.jQuery);
</script>
