From: Michael Tremer Date: Sun, 17 Feb 2013 14:49:41 +0000 (+0100) Subject: Make debug mode configurable. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97144eb5df636c707bf3c03f1c519496bf72c6fa;p=pbs.git Make debug mode configurable. Default is false. --- diff --git a/web/__init__.py b/web/__init__.py index 4e24902d..1315dfe2 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -16,6 +16,7 @@ import handlers_api BASEDIR = os.path.join(os.path.dirname(__file__), "..", "data") # Enable logging +tornado.options.define("debug", default=False, help="Run in debug mode", type=bool) tornado.options.parse_command_line() class Application(tornado.web.Application): @@ -23,7 +24,7 @@ class Application(tornado.web.Application): self.__pakfire = None settings = dict( - debug = True, + debug = tornado.options.options.debug, gzip = True, login_url = "/login", template_path = os.path.join(BASEDIR, "templates"),