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,5 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.translation import ugettext
|
||||
|
||||
|
||||
@@ -17,11 +18,12 @@ class DocumentNotCheckedOut(DocumentCheckoutError):
|
||||
pass
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class DocumentAlreadyCheckedOut(DocumentCheckoutError):
|
||||
"""
|
||||
Raised when trying to checkout an already checkedout document
|
||||
"""
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return ugettext('Document already checked out.')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user