(request, model_admin, queryset)
return type(type_str('%sFilterSet' % queryset.model.__name__), (django_filters.FilterSet, ), filterset_dict,)(request.GET, queryset=queryset)
Builds :class:`~django_filters.FilterSet` instance
    for :attr:`djadmin2.ModelAdmin2.Meta.list_filter` option.

    If :attr:`djadmin2.ModelAdmin2.Meta.list_filter` is not
    sequence, it's considered to be class with interface like
    :class:`django_filters.FilterSet` and its instantiate wit
    `request.GET` and `queryset`.
Builds :class:`~django_filters.FilterSet` instance
    for :attr:`djadmin2.ModelAdmin2.Meta.list_filter` option.
Builds : class : ~django_filters . FilterSet instance for : attr : djadmin2 . ModelAdmin2 . Meta . list_filter option .
def build_list_filter(request, model_admin, queryset):
    """Builds :class:`~django_filters.FilterSet` instance
    for :attr:`djadmin2.ModelAdmin2.Meta.list_filter` option.

    If :attr:`djadmin2.ModelAdmin2.Meta.list_filter` is not
    sequence, it's considered to be class with interface like
    :class:`django_filters.FilterSet` and its instantiate wit
    `request.GET` and `queryset`.
    """
    # if ``list_filter`` is not iterable return it right away
    if not isinstance(model_admin.list_filter, collections.abc.Iterable):
        return model_admin.list_filter(
            request.GET,
            queryset=queryset,
        )
    # otherwise build :mod:`django_filters.FilterSet`
    filters = []
    for field_filter in model_admin.list_filter:
        if isinstance(field_filter, str):
            filters.append(get_filter_for_field_name(
                queryset.model,
                field_filter,
            ))
        else:
            filters.append(field_filter)
    filterset_dict = {}
    for field_filter in filters:
        filterset_dict[field_filter.field_name] = field_filter
    fields = list(filterset_dict.keys())
    filterset_dict['Meta'] = type(
        type_str('Meta'),
        (),
        {
            'model': queryset.model,
            'fields': fields,
        },
    )
    return type(type_str('%sFilterSet' % queryset.model.__name__), (django_filters.FilterSet, ), filterset_dict,)(request.GET, queryset=queryset)
def build_list_filter ( request , model_admin , queryset ) : # if ``list_filter`` is not iterable return it right away if not isinstance ( model_admin . list_filter , collections . abc . Iterable ) : return model_admin . list_filter ( request . GET , queryset = queryset , ) # otherwise build :mod:`django_filters.FilterSet` filters = [ ] for field_filter in model_admin . list_filter : if isinstance ( field_filter , str ) : filters . append ( get_filter_for_field_name ( queryset . model , field_filter , ) ) else : filters . append ( field_filter ) filterset_dict = { } for field_filter in filters : filterset_dict [ field_filter . field_name ] = field_filter fields = list ( filterset_dict . keys ( ) ) filterset_dict [ 'Meta' ] = type ( type_str ( 'Meta' ) , ( ) , { 'model' : queryset . model , 'fields' : fields , } , ) return type ( type_str ( '%sFilterSet' % queryset . model . __name__ ) , ( django_filters . FilterSet , ) , filterset_dict , ) ( request . GET , queryset = queryset )