utils.decorators.decorator_from_middleware()
  • References/Python/Django/API/Django Utils

decorator_from_middleware(middleware_class) [source] Given a middleware class, returns a

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

http_date(epoch_seconds=None) [source] Formats the time to match the

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

smart_str(s, encoding='utf-8', strings_only=False, errors='strict') Alias of smart_bytes() on Python 2 and

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

item_attributes(item) [source] Return extra attributes to place on each item (i.e. item/entry)

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

to_locale(language) [source] Turns a language name (en-us) into a locale name (en_US).

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

keep_lazy(func, *resultclasses) [source] New

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

class RssUserland091Feed(RssFeed) [source] Spec:

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

mark_safe(s) [source] Explicitly mark a string as safe for (HTML) output purposes. The returned

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.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