def items(self): change_sets = [] for change_class in get_changes_classes(): change_obj = change_class() change_set = change_obj.queryset()[:MAX_CHANGES] change_sets.append(self.format_change_set(change_obj, change_set)) changes = merge_changes(change_sets)[:MAX_CHANGES] return skip_ignored_change_types(changes)
def items(self): change_sets = [] for change_class in get_changes_classes(): change_obj = change_class() change_set = change_obj.queryset()[:MAX_CHANGES] change_sets.append( self.format_change_set(change_obj, change_set)) changes = merge_changes(change_sets)[:MAX_CHANGES] return skip_ignored_change_types(changes)
def get_queryset(self): change_sets = [] start_at = self._get_start_date() for change_class in get_changes_classes(): change_obj = change_class() change_set = change_obj.queryset(start_at) change_sets.append(self.format_change_set(change_obj, change_set)) # Merge the sorted-by-date querysets. objs = merge_changes(change_sets) return self._changes_grouped_by_day(objs)
def get_queryset(self): change_sets = [] start_at = self._get_start_date() for change_class in get_changes_classes(): change_obj = change_class() change_set = change_obj.queryset(start_at) change_sets.append( self.format_change_set(change_obj, change_set)) # Merge the sorted-by-date querysets. objs = merge_changes(change_sets) return self._changes_grouped_by_day(objs)