cubicweb/pyramid/pyramidctl.py
changeset 12780 8caa109dfe94
parent 12751 30b205676182
--- a/cubicweb/pyramid/pyramidctl.py	Thu Nov 28 11:48:03 2019 +0100
+++ b/cubicweb/pyramid/pyramidctl.py	Wed Jul 24 16:11:22 2019 +0200
@@ -37,6 +37,7 @@
 from cubicweb.cwctl import CWCTL, InstanceCommand, init_cmdline_log_threshold
 from cubicweb.pyramid import wsgi_application_from_cwconfig
 from cubicweb.pyramid.config import get_random_secret_key
+from cubicweb.view import inject_html_generating_call_on_w
 from cubicweb.server import serverctl
 from cubicweb.web.webctl import WebCreateHandler
 from cubicweb.toolsutils import fill_templated_file
@@ -271,6 +272,11 @@
                       "https://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest/")
                 sys.exit(1)
 
+        if self['debug']:
+            # this is for injecting those into generated html:
+            # > cubicweb-generated-by="module.Class" cubicweb-from-source="/path/to/file.py:42"
+            inject_html_generating_call_on_w()
+
         app = wsgi_application_from_cwconfig(
             cwconfig, profile=self['profile'],
             profile_output=self['profile-output'],