1from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401 2from .tests import TESTS as DEFAULT_TESTS # noqa: F401 3from .utils import Cycler 4from .utils import generate_lorem_ipsum 5from .utils import Joiner 6from .utils import Namespace 7 8# defaults for the parser / lexer 9BLOCK_START_STRING = "{%" 10BLOCK_END_STRING = "%}" 11VARIABLE_START_STRING = "{{" 12VARIABLE_END_STRING = "}}" 13COMMENT_START_STRING = "{#" 14COMMENT_END_STRING = "#}" 15LINE_STATEMENT_PREFIX = None 16LINE_COMMENT_PREFIX = None 17TRIM_BLOCKS = False 18LSTRIP_BLOCKS = False 19NEWLINE_SEQUENCE = "\n" 20KEEP_TRAILING_NEWLINE = False 21 22# default filters, tests and namespace 23 24DEFAULT_NAMESPACE = { 25 "range": range, 26 "dict": dict, 27 "lipsum": generate_lorem_ipsum, 28 "cycler": Cycler, 29 "joiner": Joiner, 30 "namespace": Namespace, 31} 32 33# default policies 34DEFAULT_POLICIES = { 35 "compiler.ascii_str": True, 36 "urlize.rel": "noopener", 37 "urlize.target": None, 38 "truncate.leeway": 5, 39 "json.dumps_function": None, 40 "json.dumps_kwargs": {"sort_keys": True}, 41 "ext.i18n.trimmed": False, 42} 43