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:
@@ -11,6 +11,7 @@ from django.conf import settings
|
||||
from django.core.urlresolvers import resolve as django_resolve
|
||||
from django.urls.base import get_script_prefix
|
||||
from django.utils.datastructures import MultiValueDict
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.http import urlquote as django_urlquote
|
||||
from django.utils.http import urlencode as django_urlencode
|
||||
|
||||
@@ -136,7 +137,7 @@ def return_attrib(obj, attrib, arguments=None):
|
||||
if settings.DEBUG:
|
||||
return 'Attribute error: %s; %s' % (attrib, exception)
|
||||
else:
|
||||
return unicode(exception)
|
||||
return force_text(exception)
|
||||
|
||||
|
||||
def urlquote(link=None, get=None):
|
||||
|
||||
Reference in New Issue
Block a user