  """
  The metadata API is used to allow cusomization of how `OPTIONS` requests
  are handled. We currently provide a single default implementation that returns
  some fairly ad-hoc information about the view.
  
  Future implementations might use JSON schema or other definations in order
  to return this information in a more standardized way.
 
</s> remove Future implementations might use JSON schema or other definations in order
 </s> add Future implementations might use JSON schema or other definitions in order </s> remove # Handle django.utils.encoding rename in 1.5 onwards.
# smart_unicode -> smart_text
# force_unicode -> force_text
try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text
try:
    from django.utils.encoding import force_text
except ImportError:
    from django.utils.encoding import force_unicode as force_text


 </s> add  </s> remove def get_concrete_model(model_cls):
    try:
        return model_cls._meta.concrete_model
    except AttributeError:
        # 1.3 does not include concrete model
        return model_cls


 </s> add  </s> remove from django.utils.encoding import python_2_unicode_compatible
from rest_framework.compat import apply_markdown, smart_text
 </s> add from django.utils.encoding import python_2_unicode_compatible, smart_text
from rest_framework.compat import apply_markdown </s> remove except:
 </s> add except ImportError:
The metadata API is used to allow customization of how `OPTIONS` requests
  """
The metadata API is used to allow customization of how `OPTIONS` requests
  are handled. We currently provide a single default implementation that returns
  some fairly ad-hoc information about the view.
  
  Future implementations might use JSON schema or other definations in order
  to return this information in a more standardized way.
keep replace keep keep keep keep keep
 Removed custom StringIO, force_text, smart_text compat 
rest_framework/metadata.py