# put this in a templatetag library: from django.template import Library register = Library() def admin_list_filter_select(cl, spec): choices = list(spec.choices(cl)) # query_string of a non-all option will contain the name of our param (skipping '?'): # ?param1=x&fieldname_param=y key = (k.split('=')[0] for k in choices[-1]['query_string'][1:].split('&') if k.startswith(spec.field.name)).next() for c in choices: # find the option's value by looking after our key and skipping '=' if key in c['query_string']: c['val'] = c['query_string'].split(key)[1].split('&')[-1][1:] else: c['val'] = '' return {'field_name': key, 'title': spec.title(), 'choices' : choices} admin_list_filter_select = register.inclusion_tag('admin/filter_select.html')(admin_list_filter_select) # template: {% load i18n %} # modify your admin/change_list.hml to include the templatetag lib and this code: (for example # in the search block: ... {% block search %}{% search_form cl %} {% if cl.has_filters %}
{% endif %} {% endblock %}