jinja2.utils

jinja2.utils

Utility functions.

copyright:
  1. 2010 by the Jinja Team.
license:

BSD, see LICENSE for more details.

Classes

Cycler A cycle helper for templates.
Joiner A joining helper for templates.
LRUCache A simple LRU Cache implementation.

Functions

allocate_lock(() -> lock object) (allocate() is an obsolete synonym)
clear_caches() Jinja2 keeps internal caches for environments and lexers.
concat S.join(iterable) -> unicode
consume(iterable) Consumes an iterable without doing anything with it.
contextfunction(f) This decorator can be used to mark a function or method context callable.
environmentfunction(f) This decorator can be used to mark a function or method as environment callable.
evalcontextfunction(f) This decoraotr can be used to mark a function or method as an eval context callable.
generate_lorem_ipsum([n, html, min, max]) Generate some lorem impsum for the template.
import_string(import_name[, silent]) Imports an object based on a string.
internalcode(f) Marks the function as internally used
is_python_keyword x.__contains__(y) <==> y in x.
is_undefined(obj) Check if the object passed is undefined.
next(iterator[, default]) Return the next item from the iterator.
object_type_repr(obj) Returns the name of the object’s type.
open_if_exists(filename[, mode]) Returns a file descriptor for the filename if that file exists,
pformat(obj[, verbose]) Prettyprint an object.
urlize(text[, trim_url_limit, nofollow]) Converts any URLs in text into clickable links. Works on http://,

Defined

  • CodeType
  • FrameType
  • FunctionType
  • GeneratorType
  • Markup
  • MethodType
  • MutableMapping
  • TracebackType
  • deque
  • errno
  • escape
  • imap
  • internal_code
  • missing
  • partial
  • re
  • soft_unicode
  • sys

Table Of Contents

Previous topic

test_upper

Next topic

Cycler Class