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:
@@ -1,6 +1,7 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django import forms
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common.classes import ModelAttribute
|
||||
@@ -27,7 +28,7 @@ class IndexTemplateNodeForm(forms.ModelForm):
|
||||
self.fields['parent'].widget = forms.widgets.HiddenInput()
|
||||
self.fields['expression'].help_text = ' '.join(
|
||||
[
|
||||
unicode(self.fields['expression'].help_text),
|
||||
force_text(self.fields['expression'].help_text),
|
||||
ModelAttribute.help_text_for(
|
||||
Document, type_names=['indexing']
|
||||
).replace('\n', '<br>')
|
||||
|
||||
Reference in New Issue
Block a user