OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """ | 2 """ |
3 jinja2.defaults | 3 jinja2.defaults |
4 ~~~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~~~ |
5 | 5 |
6 Jinja default filters and tags. | 6 Jinja default filters and tags. |
7 | 7 |
8 :copyright: (c) 2010 by the Jinja Team. | 8 :copyright: (c) 2010 by the Jinja Team. |
9 :license: BSD, see LICENSE for more details. | 9 :license: BSD, see LICENSE for more details. |
10 """ | 10 """ |
(...skipping 14 matching lines...) Expand all Loading... |
25 LSTRIP_BLOCKS = False | 25 LSTRIP_BLOCKS = False |
26 NEWLINE_SEQUENCE = '\n' | 26 NEWLINE_SEQUENCE = '\n' |
27 KEEP_TRAILING_NEWLINE = False | 27 KEEP_TRAILING_NEWLINE = False |
28 | 28 |
29 | 29 |
30 # default filters, tests and namespace | 30 # default filters, tests and namespace |
31 from jinja2.filters import FILTERS as DEFAULT_FILTERS | 31 from jinja2.filters import FILTERS as DEFAULT_FILTERS |
32 from jinja2.tests import TESTS as DEFAULT_TESTS | 32 from jinja2.tests import TESTS as DEFAULT_TESTS |
33 DEFAULT_NAMESPACE = { | 33 DEFAULT_NAMESPACE = { |
34 'range': range_type, | 34 'range': range_type, |
35 'dict': lambda **kw: kw, | 35 'dict': dict, |
36 'lipsum': generate_lorem_ipsum, | 36 'lipsum': generate_lorem_ipsum, |
37 'cycler': Cycler, | 37 'cycler': Cycler, |
38 'joiner': Joiner | 38 'joiner': Joiner |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 # export all constants | 42 # export all constants |
43 __all__ = tuple(x for x in locals().keys() if x.isupper()) | 43 __all__ = tuple(x for x in locals().keys() if x.isupper()) |
OLD | NEW |