utils.translation.gettext_noop()
  • References/Python/Django/API/Django Utils

gettext_noop(message) [source]

2025-01-10 15:47:30
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.translation.pgettext()
  • References/Python/Django/API/Django Utils

pgettext(context, message) [source] Translates message given the context

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

get_language() [source] Returns the currently selected language code. Returns None

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.cache.patch_cache_control()
  • References/Python/Django/API/Django Utils

patch_cache_control(response, **kwargs) [source] This function patches the Cache-Control

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

patch_vary_headers(response, newheaders) [source] Adds (or updates) the Vary

2025-01-10 15:47:30