Commits

Andriy Kornatskyy committed 4c06e9f

Added configuration option to manage mako inline-preprocessing-enabled (advised False for development and True for production modes).

Comments (0)

Files changed (2)

demos/template/development.ini

 [mako]
 filesystem-checks = False
 module-directory = /tmp/mako_modules
+inline-preprocessor-enabled = True
 
 [jinja2]
 auto-reload = False

demos/template/src/config.py

             default_filters=[],
             imports=['s = unicode'],
             preprocessor=[
-                inline_preprocessor(directories, enabled=True),
+                inline_preprocessor(directories, enabled=config.getboolean(
+                    'mako', 'inline-preprocessor-enabled')),
                 widget_preprocessor,
                 whitespace_preprocessor,
             ])