'Returns the preserved filters querystring.'

def get_preserved_filters(self, request):

    match = request.resolver_match
    if (self.preserve_filters and match):
        opts = self.model._meta
        current_url = ('%s:%s' % (match.app_name, match.url_name))
        changelist_url = ('admin:%s_%s_changelist' % (opts.app_label, opts.model_name))
        if (current_url == changelist_url):
            preserved_filters = request.GET.urlencode()
        else:
            preserved_filters = request.GET.get('_changelist_filters')
        if preserved_filters:
            return urlencode({'_changelist_filters': preserved_filters})
    return ''
