      output_field_class = None
      geom_param_pos = (0,)
  
      def __init__(self, *expressions, **extra):
          if 'output_field' not in extra and self.output_field_class:
              extra['output_field'] = self.output_field_class()
          super().__init__(*expressions, **extra)
  
          # Ensure that value expressions are geometric.
          for pos in self.geom_param_pos:
              expr = self.source_expressions[pos]
 
</s> remove     output_field_class = None
 </s> add  </s> remove     output_field_class = TextField
 </s> add     output_field = TextField() </s> remove     output_field_class = TextField
 </s> add     output_field = TextField() </s> remove     output_field_class = TextField
 </s> add     output_field = TextField() </s> remove         output_field = copy.output_field
        explicit_output_field = field.__class__ != copy.output_field.__class__
 </s> add         class_output_field = self.__class__.output_field if isinstance(self.__class__.output_field, Field) else None
        output_field = class_output_field or copy.output_field
        has_explicit_output_field = class_output_field or field.__class__ is not copy.output_field.__class__
      output_field_class = None
      geom_param_pos = (0,)
  
      def __init__(self, *expressions, **extra):


          super().__init__(*expressions, **extra)
  
          # Ensure that value expressions are geometric.
          for pos in self.geom_param_pos:
              expr = self.source_expressions[pos]
keep keep keep keep 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/gis/db/models/functions.py