Replace all instances of unicode only handling to use force_text.

Replace all __unicode__ methods to __str__ and the
@python_2_unicode_compatible decorator.
Replace all instance of smart_str, smart_unicode, force_uncode
with force_text.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-07-05 15:03:24 -04:00
parent 95157460cb
commit 6c6ca38374
47 changed files with 150 additions and 106 deletions

View File

@@ -2,9 +2,11 @@ from __future__ import unicode_literals
from django.conf.urls import include, url
from django.conf import settings
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.module_loading import import_string
@python_2_unicode_compatible
class APIEndPoint(object):
_registry = {}
@@ -16,8 +18,8 @@ class APIEndPoint(object):
def get(cls, name):
return cls._registry[name]
def __unicode__(self):
return unicode(self.app.name)
def __str__(self):
return force_text(self.app.name)
def __init__(self, app, version_string, name=None):
self.app = app