Commits

Adrian Dries  committed f040db5

no template cache for devel

  • Participants
  • Parent commits bcce68c

Comments (0)

Files changed (1)

File fenton/web.py

     dirs = [op.join(d, 'templates') for d in app.source_dirs()]
     work_dir = op.join(config['work_dir'], 'templates')
     return TemplateLookup(directories=dirs,
-                          #filesystem_checks=app.debug,
                           input_encoding=DEFAULT_ENCODING,
                           output_encoding=config.get('www_encoding',
                                                      DEFAULT_ENCODING),
                           imports=['import markupsafe'],
                           default_filters=['markupsafe.escape_silent'],
                           error_handler=mako_errorhandler,
-                          module_directory=work_dir)
+                          module_directory=not app.debug and work_dir or None)
 
 
 def mako_errorhandler(context, e):