      substring is not found.
      """
      function = 'INSTR'
      arity = 2
  
      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)
  
      def as_postgresql(self, compiler, connection):
          return super().as_sql(compiler, connection, function='STRPOS')
  
  
 
</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, output_field=None, **extra):
        if output_field is None:
            output_field = fields.DateTimeField()
        super().__init__(output_field=output_field, **extra)
 </s> add     output_field = fields.DateTimeField() </s> remove     @property
    def output_field(self):
        return fields.BooleanField()

 </s> add  </s> remove         super().__init__(expression, string, output_field=FloatField(), **extra)
 </s> add         super().__init__(expression, string, **extra)
    output_field = fields.IntegerField()
      substring is not found.
      """
      function = 'INSTR'
      arity = 2
    output_field = fields.IntegerField()
    output_field = fields.IntegerField()
    output_field = fields.IntegerField()
    output_field = fields.IntegerField()
    output_field = fields.IntegerField()
    output_field = fields.IntegerField()
    output_field = fields.IntegerField()
  
      def as_postgresql(self, compiler, connection):
          return super().as_sql(compiler, connection, function='STRPOS')
  
  
keep keep keep keep replace replace replace replace 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/db/models/functions/base.py