[PATCH 1 of 2] [debugtoolbar] Do not render CW controller panel when no controller got collected

Simon Chabot simon.chabot at logilab.fr
Wed Mar 18 17:12:56 CET 2020


# HG changeset patch
# User Simon Chabot <simon.chabot at logilab.fr>
# Date 1584023879 -3600
#      Thu Mar 12 15:37:59 2020 +0100
# Node ID 747190dd8020fe3c28bc852bd18cf5cc3bb0e99f
# Parent  c829cace0172628e91eaa36511eee7b7c2119882
# Available At https://hg.logilab.org/review/cubicweb/
#              hg pull https://hg.logilab.org/review/cubicweb/ -r 747190dd8020
# EXP-Topic debugtoolbar_fixes
[debugtoolbar] Do not render CW controller panel when no controller got collected

This can happen on pure pyramid applications for instance.

diff -r c829cace0172 -r 747190dd8020 cubicweb/pyramid/debug_toolbar_templates/cw.dbtmako
--- a/cubicweb/pyramid/debug_toolbar_templates/cw.dbtmako	Wed Mar 18 11:45:35 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



More information about the cubicweb-devel mailing list