[debugtoolbar] Do not render CW controller panel when no controller got collected
authorSimon Chabot <simon.chabot@logilab.fr>
Thu, 12 Mar 2020 15:37:59 +0100
changeset 12929 edfee40475bb
parent 12928 327b11ee0914
child 12930 665f66e57fc6
[debugtoolbar] Do not render CW controller panel when no controller got collected This can happen on pure pyramid applications for instance.
cubicweb/pyramid/debug_toolbar_templates/cw.dbtmako
--- a/cubicweb/pyramid/debug_toolbar_templates/cw.dbtmako	Wed Mar 18 11:30:05 2020 +0100
+++ b/cubicweb/pyramid/debug_toolbar_templates/cw.dbtmako	Thu Mar 12 15:37:59 2020 +0100
@@ -1,3 +1,5 @@
+% if controller:
+
 <h3>Controller</h3>
 
 <table class="table table-striped table-condensed">
@@ -61,3 +63,6 @@
     <li><a href="/cwsource">data sources</a></li>
     <li><a href="/siteinfo">Site information</a></li>
 </ul>
+% else:
+<p>No controller store got collected.</p>
+% endif