utils.encoding.smart_bytes()
  • References/Python/Django/API/Django Utils

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

2025-01-10 15:47:30
utils.safestring.SafeString
  • References/Python/Django/API/Django Utils

class SafeString A str subclass that has been specifically marked as “safe” (requires no further escaping) for

2025-01-10 15:47:30
utils.timezone.activate()
  • References/Python/Django/API/Django Utils

activate(timezone) [source] Sets the current time zone.

2025-01-10 15:47:30
utils.timezone.get_current_timezone_name()
  • References/Python/Django/API/Django Utils

get_current_timezone_name() [source] Returns the name of the current

2025-01-10 15:47:30
utils.timezone.is_naive()
  • References/Python/Django/API/Django Utils

is_naive(value) [source] Returns True if value is naive, False

2025-01-10 15:47:30
utils.http.urlquote()
  • References/Python/Django/API/Django Utils

urlquote(url, safe='/') [source] A version of Python’s urllib.quote() function

2025-01-10 15:47:30
utils.translation.ungettext()
  • References/Python/Django/API/Django Utils

ungettext(singular, plural, number) [source] Translates singular and plural

2025-01-10 15:47:30
utils.translation.templatize()
  • References/Python/Django/API/Django Utils

templatize(src) [source] Turns a Django template into something that is understood by xgettext

2025-01-10 15:47:30
utils.feedgenerator.get_tag_uri()
  • References/Python/Django/API/Django Utils

get_tag_uri(url, date) [source] Creates a TagURI. See

2025-01-10 15:47:30
utils.encoding.is_protected_type()
  • References/Python/Django/API/Django Utils

is_protected_type(obj) [source] Determine if the object instance is of a protected type.

2025-01-10 15:47:30