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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.