  
  class TrigramBase(Func):
      def __init__(self, expression, string, **extra):
          if not hasattr(string, 'resolve_expression'):
              string = Value(string)
          super().__init__(expression, string, **extra)
  
 
</s> remove         super().__init__(expression, string, output_field=FloatField(), **extra)
 </s> add         super().__init__(expression, string, **extra) </s> remove 
    def __init__(self, string, substring, **extra):
        """
        string: the name of a field, or an expression returning a string
        substring: the name of a field, or an expression returning a string
        """
        super().__init__(string, substring, output_field=fields.IntegerField(), **extra)
 </s> add     output_field = fields.IntegerField() </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     output_field_class = TextField
 </s> add     output_field = TextField() </s> remove 
    def __init__(self, output_field=None, **extra):
        if output_field is None:
            output_field = DateTimeField()
        super().__init__(output_field=output_field, **extra)
 </s> add     output_field = DateTimeField()
    output_field = FloatField()

  
  class TrigramBase(Func):
    output_field = FloatField()

      def __init__(self, expression, string, **extra):
          if not hasattr(string, 'resolve_expression'):
              string = Value(string)
          super().__init__(expression, string, **extra)
  
keep add 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/search.py