      contains_aggregate = True
      name = None
      filter_template = '%s FILTER (WHERE %%(filter)s)'
      window_compatible = True
  
      def __init__(self, *expressions, distinct=False, filter=None, **extra):
          if distinct and not self.allow_distinct:
              raise TypeError("%s does not allow distinct." % self.__class__.__name__)
 
</s> remove     def __init__(self, *args, filter=None, **kwargs):
 </s> add     def __init__(self, *expressions, distinct=False, filter=None, **extra):
        if distinct and not self.allow_distinct:
            raise TypeError("%s does not allow distinct." % self.__class__.__name__)
        self.distinct = distinct </s> remove     def __init__(self, expression, distinct=False, filter=None, **extra):
 </s> add     def __init__(self, expression, filter=None, **extra): </s> remove     template = '%(function)s(%(distinct)s%(expressions)s)'
 </s> add 
    allow_distinct = False
      contains_aggregate = True
      name = None
      filter_template = '%s FILTER (WHERE %%(filter)s)'
      window_compatible = True
    allow_distinct = False
  
      def __init__(self, *expressions, distinct=False, filter=None, **extra):
          if distinct and not self.allow_distinct:
              raise TypeError("%s does not allow distinct." % self.__class__.__name__)
keep keep keep add keep keep keep keep
 Fixed #28658 -- Added DISTINCT handling to the Aggregate class. 
django/db/models/aggregates.py