{% load i18n %}
<h3>{% blocktrans with filter_title=title %} By {{ filter_title }} {% endblocktrans %}</h3>
<select name="{{ title }}">
    {% for choice in choices %}
        <option {% if choice.selected %} class="selected"{% endif %}
                                         value="{{ choice.query_string|iriencode }}">{{ choice.display }}</option>
    {% endfor %}
</select>
<script>
    jQuery(function ($) {
        $('select').select2();
    });
</script>