parent
5301a9d7b1
commit
03671ad7e3
|
@ -7,16 +7,17 @@ from gzip import GzipFile
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
if not six.PY3:
|
|
||||||
# Import force_unicode even though this module doesn't use it, because some
|
|
||||||
# people rely on it being here.
|
|
||||||
from django.utils.encoding import force_unicode
|
|
||||||
from django.utils.functional import allow_lazy, SimpleLazyObject
|
from django.utils.functional import allow_lazy, SimpleLazyObject
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.utils.six.moves import html_entities
|
from django.utils.six.moves import html_entities
|
||||||
from django.utils.translation import ugettext_lazy, ugettext as _, pgettext
|
from django.utils.translation import ugettext_lazy, ugettext as _, pgettext
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
|
|
||||||
|
if not six.PY3:
|
||||||
|
# Import force_unicode even though this module doesn't use it, because some
|
||||||
|
# people rely on it being here.
|
||||||
|
from django.utils.encoding import force_unicode
|
||||||
|
|
||||||
# Capitalizes the first letter of a string.
|
# Capitalizes the first letter of a string.
|
||||||
capfirst = lambda x: x and force_text(x)[0].upper() + force_text(x)[1:]
|
capfirst = lambda x: x and force_text(x)[0].upper() + force_text(x)[1:]
|
||||||
capfirst = allow_lazy(capfirst, six.text_type)
|
capfirst = allow_lazy(capfirst, six.text_type)
|
||||||
|
|
Loading…
Reference in New Issue