          )
  
          if self.format.lower() == ISO_8601:
              return value.isoformat()
          return value.strftime(self.format)
  
  
  class DurationField(Field):
      default_error_messages = {
          'invalid': _('Duration has wrong format. Use one of these formats instead: {format}.'),
 
</s> remove         return value.strftime(self.format)
 </s> add         return value.strftime(output_format) </s> remove         return value.strftime(self.format)
 </s> add         return value.strftime(output_format) </s> remove     format = api_settings.TIME_FORMAT
    input_formats = api_settings.TIME_INPUT_FORMATS
 </s> add  </s> remove         if self.format.lower() == ISO_8601:
 </s> add         if output_format.lower() == ISO_8601: </s> remove     format = api_settings.DATE_FORMAT
    input_formats = api_settings.DATE_INPUT_FORMATS
 </s> add 
        return value.strftime(output_format)
          )
  
          if self.format.lower() == ISO_8601:
              return value.isoformat()
        return value.strftime(output_format)
  
  
  class DurationField(Field):
      default_error_messages = {
          'invalid': _('Duration has wrong format. Use one of these formats instead: {format}.'),
keep keep keep keep replace keep keep keep keep keep
 Access settings lazily, not at module import 
rest_framework/fields.py