def get_filter_forms(self):
    for (name, attr) in self.get_filters():
        if attr.filter_set:
            form = attr.get_form_class(name)()
            form.name = name
            (yield form)
            data_set = attr.get_data_set(name, self.filter_states)
            for i in range(len(data_set)):
                data = data_set[i]
                state = attr.get_filter_state_from_data(name, data)
                form = attr.get_form_class(name=name, postfix='FormSetElem')(data=state)
                form.delete = {'filter': name, 'index': i}
                form.name = name
                (yield form)
        else:
            form = attr.get_form_class(name)(data=self.filter_states)
            form.name = name
            (yield form)
def get_filter_forms(self):
    for (name, attr) in self.get_filters():
        if attr.filter_set:
            form = attr.get_form_class(name)()
            form.name = name
            (yield form)
            data_set = attr.get_data_set(name, self.filter_states)
            for i in range(len(data_set)):
                data = data_set[i]
                state = attr.get_filter_state_from_data(name, data)
                form = attr.get_form_class(name=name, postfix='FormSetElem')(data=state)
                form.delete = {'filter': name, 'index': i}
                form.name = name
                (yield form)
        else:
            form = attr.get_form_class(name)(data=self.filter_states)
            form.name = name
            (yield form)