code: def field_type(field):
      
      if hasattr(field, 'field') and field.field:
          return field.field.__class__.__name__.lower()
      return ''
docs: Template filter that returns field class name (in lower case).
      E.g. if field is CharField then {{ field|field_type }} will
      return 'charfield'.