utils.encoding.smart_text()

smart_text(s, encoding='utf-8', strings_only=False, errors='strict') [source]

Returns a text object representing sunicode on Python 2 and str on Python 3. Treats bytestrings using the encoding codec.

If strings_only is True, don’t convert (some) non-string-like objects.

doc_Django
2016-10-09 18:40:25
Comments
Leave a Comment

Please login to continue.