[pyramid/ctl/debugtoolbar] automatically include custom panels on -t

authorLaurent Peuch <cortex@worlddomination.be>
changesetf14dde905818
branchdefault
phasepublic
hiddenno
parent revision#10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
child revision#5c609202eb61 [debug-toolbar] make linter happy
files modified by this revision
cubicweb/pyramid/__init__.py
# HG changeset patch
# User Laurent Peuch <cortex@worlddomination.be>
# Date 1564539380 -7200
# Wed Jul 31 04:16:20 2019 +0200
# Node ID f14dde9058180d91194b5dd1f45e857c8771c96a
# Parent 10b8352b0208de3f29c37df46dcebef0bf4f49da
[pyramid/ctl/debugtoolbar] automatically include custom panels on -t

diff --git a/cubicweb/pyramid/__init__.py b/cubicweb/pyramid/__init__.py
@@ -72,10 +72,13 @@
1              'pyramid.debug_notfound': True,
2              'pyramid.debug_routematch': True,
3              'pyramid.reload_templates': True,
4          })
5 
6 +        if debugtoolbar:
7 +            settings["debugtoolbar.includes"] = ["cubicweb.pyramid.debugtoolbar_panels"]
8 +
9      for fname in settings_filenames:
10          if os.path.exists(fname):
11              cp = ConfigParser()
12              cp.read(fname)
13              settings.update(cp.items('main'))