@classmethod
def filter_for_reverse_field(cls, f, name):
    rel = f.field.rel
    queryset = f.field.model._default_manager.all()
    default = {'name': name, 'label': capfirst(rel.related_name), 'queryset': queryset}
    if rel.multiple:
        return ModelMultipleChoiceFilter(**default)
    else:
        return ModelChoiceFilter(**default)
@classmethod
def filter_for_reverse_field(cls, f, name):
    rel = f.field.rel
    queryset = f.field.model._default_manager.all()
    default = {'name': name, 'label': capfirst(rel.related_name), 'queryset': queryset}
    if rel.multiple:
        return ModelMultipleChoiceFilter(**default)
    else:
        return ModelChoiceFilter(**default)