      format = ', '.join(formats).replace(ISO_8601, 'YYYY[-MM[-DD]]')
      return humanize_strptime(format)
  
  
  def humanize_field_type(field_type):
      """Return a human-readable name for a field type.
  
      :param field_type: Either a field type class (for example
          django.forms.fields.DateTimeField), or the name of a field type
          (for example "DateTimeField").
  
      :return: unicode
  
      """
      if isinstance(field_type, basestring):
          field_type_name = field_type
      else:
          field_type_name = field_type.__name__
      try:
          return HUMANIZED_FIELD_TYPES[field_type_name]
      except KeyError:
          humanized = re.sub('([a-z0-9])([A-Z])', r'\1 \2', field_type_name)
          return humanized.capitalize()
  
  
  def humanize_field(field):
      """Return a human-readable description of a field.
  
      :param field: A Django field.
  
      :return: A dictionary of the form {type: type name, required: bool,
               label: field label: read_only: bool,
               help_text: optional help text}
  
      """
      humanized = {
          'type': humanize_field_type(field.__class__),
          'required': getattr(field, 'required', False),
      }
      optional_attrs = ['read_only', 'help_text', 'label',
                        'min_length', 'max_length']
      for attr in optional_attrs:
          if getattr(field, attr, None) is not None:
              humanized[attr] = getattr(field, attr)
      return humanized
  
  
  def humanize_form_fields(form):
      """Return a humanized description of all the fields in a form.
  
      :param form: A Django form.
      :return: A dictionary of {field_label: humanized description}
 
</s> remove         self.assertEqual(getattr(serializer.fields['url_field'], 'max_length'), 20)


class HumanizedFieldType(TestCase):
    def test_standard_type_classes(self):
        for field_type_name in forms.fields.__all__:
            field_type = getattr(forms.fields, field_type_name)
            humanized = humanize_field_type(field_type)
            self.assert_valid_name(humanized)

    def test_standard_type_names(self):
        for field_type_name in forms.fields.__all__:
            humanized = humanize_field_type(field_type_name)
            self.assert_valid_name(humanized)

    def test_custom_type_name(self):
        humanized = humanize_field_type('SomeCustomType')
        self.assertEquals(humanized, u'Some custom type')

    def test_custom_type(self):
        custom_type = namedtuple('SomeCustomType', [])
        humanized = humanize_field_type(custom_type)
        self.assertEquals(humanized, u'Some custom type')

    def assert_valid_name(self, humanized):
        """A humanized field name is valid if it's a non-empty
        unicode.

        """
        self.assertIsInstance(humanized, unicode)
        self.assertNotEqual(humanized, '')
 </s> add         self.assertEqual(getattr(serializer.fields['url_field'],
                         'max_length'), 20) </s> remove HUMANIZED_FIELD_TYPES = {
    'BooleanField': u'Boolean',
    'CharField': u'String',
    'ChoiceField': u'Single Choice',
    'ComboField': u'Single Choice',
    'DateField': u'Date',
    'DateTimeField': u'Date and Time',
    'DecimalField': u'Decimal',
    'EmailField': u'Email',
    'Field': u'Field',
    'FileField': u'File',
    'FilePathField': u'File Path',
    'FloatField': u'Float',
    'GenericIPAddressField': u'Generic IP Address',
    'IPAddressField': u'IP Address',
    'ImageField': u'Image',
    'IntegerField': u'Integer',
    'MultiValueField': u'Multiple Value',
    'MultipleChoiceField': u'Multiple Choice',
    'NullBooleanField': u'Nullable Boolean',
    'RegexField': u'Regular Expression',
    'SlugField': u'Slug',
    'SplitDateTimeField': u'Split Date and Time',
    'TimeField': u'Time',
    'TypedChoiceField': u'Typed Single Choice',
    'TypedMultipleChoiceField': u'Typed Multiple Choice',
    'URLField': u'URL',
}


 </s> add  </s> remove                     actions[method] = humanize_form_fields(serializer)
 </s> add                     actions[method] = serializer.humanized
      format = ', '.join(formats).replace(ISO_8601, 'YYYY[-MM[-DD]]')
      return humanize_strptime(format)
  
  











































  def humanize_form_fields(form):
      """Return a humanized description of all the fields in a form.
  
      :param form: A Django form.
      :return: A dictionary of {field_label: humanized description}
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 simplified, moved field humanizing to Field. broken tests 
rest_framework/fields.py