From cab5aab88515c15cae3d2ed8b268f7dd37d21f87 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 22 Nov 2016 13:06:47 +0800 Subject: webui: Add "/debug" handler when in debug mode. --- fg21sim/webui/app.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fg21sim/webui/app.py') diff --git a/fg21sim/webui/app.py b/fg21sim/webui/app.py index e234263..ba27222 100644 --- a/fg21sim/webui/app.py +++ b/fg21sim/webui/app.py @@ -67,6 +67,9 @@ class Application(tornado.web.Application): url(r"/ajax/console", ConsoleAJAXHandler), url(r"/ws", WSHandler), ] + if options.debug: + from .handlers.base import BaseRequestHandler + handlers.append(url(r"/debug", BaseRequestHandler, name="debug")) # Application settings settings = { # The static files will be served from the default "/static/" URI. -- cgit v1.2.2