diff options
| author | Tymur Maryokhin | 2014-12-04 02:50:25 +0100 | 
|---|---|---|
| committer | Tymur Maryokhin | 2014-12-04 02:50:25 +0100 | 
| commit | 09e59f268619927dc22f15fed97c3ceac05ea306 (patch) | |
| tree | c49f1adee6a631ea9abacc1425d5d92bdbec2da8 /rest_framework/utils | |
| parent | f8fdfe5a9379bd72066f7ac3a05198271a74088a (diff) | |
| download | django-rest-framework-09e59f268619927dc22f15fed97c3ceac05ea306.tar.bz2 | |
Removed custom python_2_unicode_compatible. Closes #2183
Diffstat (limited to 'rest_framework/utils')
| -rw-r--r-- | rest_framework/utils/mediatypes.py | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/rest_framework/utils/mediatypes.py b/rest_framework/utils/mediatypes.py index 87b3cc6a..de2931c2 100644 --- a/rest_framework/utils/mediatypes.py +++ b/rest_framework/utils/mediatypes.py @@ -5,6 +5,7 @@ See http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7  """  from __future__ import unicode_literals  from django.http.multipartparser import parse_header +from django.utils.encoding import python_2_unicode_compatible  from rest_framework import HTTP_HEADER_ENCODING @@ -43,6 +44,7 @@ def order_by_precedence(media_type_lst):      return [media_types for media_types in ret if media_types] +@python_2_unicode_compatible  class _MediaType(object):      def __init__(self, media_type_str):          if media_type_str is None: @@ -79,9 +81,6 @@ class _MediaType(object):          return 3      def __str__(self): -        return self.__unicode__().encode('utf-8') - -    def __unicode__(self):          ret = "%s/%s" % (self.main_type, self.sub_type)          for key, val in self.params.items():              ret += "; %s=%s" % (key, val) | 
