From: bdarnell Date: Sun, 6 Oct 2013 00:32:23 +0000 (-0700) Subject: Merge pull request #896 from jniznan/master X-Git-Tag: v3.2.0b1~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c4392ae19e94ca2cd96edb993a1e44e3548e58a;p=thirdparty%2Ftornado.git Merge pull request #896 from jniznan/master Possibility to disable autoreload when debug is on --- 8c4392ae19e94ca2cd96edb993a1e44e3548e58a diff --cc tornado/web.py index 6c88ca4ec,caeb243b1..7692de753 --- a/tornado/web.py +++ b/tornado/web.py @@@ -1648,18 -1602,12 +1653,19 @@@ class Application(object) args = [unquote(s) for s in match.groups()] break if not handler: - handler = ErrorHandler(self, request, status_code=404) + if self.settings.get('default_handler_class'): + handler_class = self.settings['default_handler_class'] + handler_args = self.settings.get( + 'default_handler_args', {}) + else: + handler_class = ErrorHandler + handler_args = dict(status_code=404) + handler = handler_class(self, request, **handler_args) - # In debug mode, re-compile templates and reload static files on every + # If template cache is disabled (usually in the debug mode), + # re-compile templates and reload static files on every # request so you don't need to restart to see changes - if self.settings.get("debug"): + if not self.settings.get("template_cache"): with RequestHandler._template_loader_lock: for loader in RequestHandler._template_loaders.values(): loader.reset()