  
  
  class RegrCount(StatAggregate):
      function = 'REGR_COUNT'
  
      def __init__(self, y, x, filter=None):
          super().__init__(y=y, x=x, output_field=IntegerField(), filter=filter)
  
      def convert_value(self, value, expression, connection):
          if value is None:
              return 0
          return int(value)
 
</s> remove     def __init__(self, y, x, output_field=FloatField(), filter=None):
 </s> add     output_field = FloatField()

    def __init__(self, y, x, output_field=None, filter=None): </s> remove                 field.name, output_field.__class__.__name__ if explicit_output_field else 'DateTimeField'
 </s> add                 field.name, output_field.__class__.__name__ if has_explicit_output_field else 'DateTimeField' </s> remove 
    def __init__(self, expression, *, output_field=None, **extra):
        super().__init__(expression, output_field=output_field or fields.IntegerField(), **extra)
 </s> add     output_field = fields.IntegerField() </s> remove     def __init__(self):
        super().__init__(output_field=fields.FloatField())
 </s> add     output_field = fields.FloatField()
    output_field = IntegerField()
  
  
  class RegrCount(StatAggregate):
      function = 'REGR_COUNT'
    output_field = IntegerField()
    output_field = IntegerField()
    output_field = IntegerField()
  
      def convert_value(self, value, expression, connection):
          if value is None:
              return 0
          return int(value)
keep keep keep keep replace replace replace keep keep keep keep keep
 Fixed #28492 -- Defined default output_field of expressions at the class level.

This wasn't possible when settings were accessed during Field initialization
time as our test suite setup script was triggering imports of expressions
before settings were configured. 
django/contrib/postgres/aggregates/statistics.py