third_party_jinja2/jinja2/defaults.py
Armin Ronacher 4f5008ff19 moved environment defaults to jinja2.defaults
--HG--
branch : trunk
2008-05-23 23:36:07 +02:00

38 lines
869 B
Python

# -*- coding: utf-8 -*-
"""
jinja2.defaults
~~~~~~~~~~~~~~~
Jinja default filters and tags.
:copyright: 2007-2008 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from jinja2.utils import generate_lorem_ipsum
# defaults for the parser / lexer
BLOCK_START_STRING = '{%'
BLOCK_END_STRING = '%}'
VARIABLE_START_STRING = '{{'
VARIABLE_END_STRING = '}}'
COMMENT_START_STRING = '{#'
COMMENT_END_STRING = '#}'
LINE_STATEMENT_PREFIX = None
TRIM_BLOCKS = False
NEWLINE_SEQUENCE = '\n'
# default filters, tests and namespace
from jinja2.filters import FILTERS as DEFAULT_FILTERS
from jinja2.tests import TESTS as DEFAULT_TESTS
DEFAULT_NAMESPACE = {
'range': xrange,
'dict': lambda **kw: kw,
'lipsum': generate_lorem_ipsum
}
# export all constants
__all__ = tuple(x for x in locals() if x.isupper())