python3: make sure __str__ return a real string
This commit is contained in:
parent
e55aef1371
commit
86a3222ce8
|
@ -40,8 +40,7 @@ from django.forms import models as model_forms
|
|||
from django import forms
|
||||
from django import template
|
||||
from django.utils import six
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.encoding import python_2_unicode_compatible, force_text
|
||||
from django.utils.html import strip_tags
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.six.moves.urllib.parse import urlparse
|
||||
|
@ -508,7 +507,7 @@ class CellBase(six.with_metaclass(CellMeta, models.Model)):
|
|||
if label and additional_label:
|
||||
return '%s (%s)' % (label, re.sub(r'\r?\n', ' ', force_text(additional_label)))
|
||||
else:
|
||||
return label
|
||||
return force_text(label)
|
||||
|
||||
@classmethod
|
||||
def get_verbose_name(cls):
|
||||
|
|
Loading…
Reference in New Issue