  
  
  class RandomUUID(Func):
      template = 'GEN_RANDOM_UUID()'
  
      def __init__(self, output_field=None, **extra):
          if output_field is None:
              output_field = UUIDField()
          super().__init__(output_field=output_field, **extra)
  
  
  class TransactionNow(Func):
      template = 'CURRENT_TIMESTAMP'
  
 
</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() </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     output_field_class = TextField
 </s> add     output_field = TextField()
    output_field = UUIDField()
  
  
  class RandomUUID(Func):
      template = 'GEN_RANDOM_UUID()'
    output_field = UUIDField()
    output_field = UUIDField()
    output_field = UUIDField()
    output_field = UUIDField()
    output_field = UUIDField()
  
  
  class TransactionNow(Func):
      template = 'CURRENT_TIMESTAMP'
  
keep keep keep keep 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/contrib/postgres/functions.py