jinja2.environment

jinja2.environment

Provides a class that holds runtime and parsing time options.

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

BSD, see LICENSE for more details.

Classes

Environment The core component of Jinja is the Environment. It contains
Template The central template object.
TemplateExpression The jinja2.Environment.compile_expression() method returns an
TemplateModule Represents an imported template.
TemplateStream A template stream works pretty much like an ordinary python generator but it can buffer multiple items to reduce the number of total iterations.

Exceptions

TemplateNotFound(name[, message]) Raised if a template does not exist.
TemplateSyntaxError(message, lineno[, name, ...]) Raised to tell the user that there is a problem with the template.
TemplatesNotFound([names, message]) Like TemplateNotFound but raised if multiple templates

Functions

concat S.join(iterable) -> unicode
copy_cache(cache) Create an empty copy of the given cache.
create_cache(size) Return the cache class for the given size.
get_spontaneous_environment(*args) Return a new spontaneous environment.
load_extensions(environment, extensions) Load the extensions from the list and bind it to the environment.

Defined

  • BLOCK_END_STRING
  • BLOCK_START_STRING
  • COMMENT_END_STRING
  • COMMENT_START_STRING
  • DEFAULT_FILTERS
  • DEFAULT_NAMESPACE
  • DEFAULT_TESTS
  • LINE_COMMENT_PREFIX
  • LINE_STATEMENT_PREFIX
  • LRUCache
  • Markup
  • NEWLINE_SEQUENCE
  • Parser
  • TRIM_BLOCKS
  • TokenStream
  • Undefined
  • VARIABLE_END_STRING
  • VARIABLE_START_STRING
  • consume
  • generate
  • get_lexer
  • import_string
  • internalcode
  • missing
  • new_context
  • nodes
  • optimize
  • os
  • sys

Table Of Contents

Previous topic

jinja2.defaults

Next topic

Environment Class