[changelog] add information about the new debug html attributes
authorLaurent Peuch <cortex@worlddomination.be>
Thu, 05 Dec 2019 02:26:14 +0100
changeset 12798 45242ceec212
parent 12797 00c14fb7c931
child 12799 e5752c14e5f0
[changelog] add information about the new debug html attributes
doc/changes/3.27.rst
--- a/doc/changes/3.27.rst	Thu Dec 05 02:12:20 2019 +0100
+++ b/doc/changes/3.27.rst	Thu Dec 05 02:26:14 2019 +0100
@@ -50,6 +50,28 @@
 * allow to specify the instance id for any instance command using the
   CW_INSTANCE global variable instead of or giving it as a cli argument
 
+* when debugmode is activated ('-D/--debug' on the pyramid command for
+  example), the HTML generated by CW will contains new tags that will indicate
+  by which object in the code it has been generated and in which line of which
+  source code.
+  For example:
+
+.. code-block:: html
+
+    <div
+      cubicweb-generated-by="cubicweb.web.views.basetemplates.TheMainTemplate"
+      cubicweb-from-source="/home/user/code/logilab/cubicweb/cubicweb/web/views/basetemplates.py:161"
+      id="contentmain">
+        <h1
+          cubicweb-generated-by="cubicweb.web.views.basetemplates.TheMainTemplate"
+          cubicweb-from-source="/home/user/code/logilab/cubicweb/cubicweb/view.py:136">
+            unset title
+        </h1>
+        [...]
+    </div>
+
+While this hasn't been done yet, this feature is an open path for building dynamic tools that can help inspect the page.
+
 * add a new '-t/--toolbar' option the pyramid command to activate the pyramid debugtoolbar
 
 * a series of pyramid debugtoolbar panels specifically made for CW, see bellow