merge default doc-dc
authorDamien Correia
Fri, 25 May 2018 15:21:23 +0200
branchdoc-dc
changeset 258 86d0f27c7f46
parent 257 a958ccc01e40 (current diff)
parent 184 d4a0668c7ee0 (diff)
child 259 931959214ed9
merge default
--- a/src/pyams_utils/data.py	Fri May 25 11:27:33 2018 +0200
+++ b/src/pyams_utils/data.py	Fri May 25 15:21:23 2018 +0200
@@ -17,9 +17,7 @@
 It can typically be used to set a *data-ams-data* attribute to objects, which is afterwards converted to
 classic *data-* attributes by **MyAMS.js** framework.
 
-For example, for a custom widget in a form:
-
-.. code-block:: python
+For example, for a custom widget in a form::
 
     def updateWidgets(self):
         super(MyForm, self).updateWidgets()
@@ -27,15 +25,11 @@
         alsoProvides(widget, IObjectData)
         widget.object_data = {'ams-colorpicker-position': 'top left'}
 
-You can then set an attribute in a TAL template like this:
-
-.. code-block:: html
+You can then set an attribute in a TAL template like this::
 
     <div tal:attributes="data-ams-data extension:object_data(widget)">...</div>
 
-After data initialization by **MyAMS.js**, the following code will be converted to:
-
-.. code-block:: html
+After data initialization by **MyAMS.js**, the following code will be converted to::
 
     <div data-ams-colorpicker-position="top left">...</div>
 """
@@ -72,9 +66,7 @@
     """extension:object_data TALES extension
 
     This TALES extension is to be used in Chameleon templates to define a custom data attribute
-    which stores all object data (see `pyams_utils.interfaces.data.IObjectData` interface), like this::
-
-    .. code-block:: html
+    which stores all object data (see :py:class:`pyams_utils.interfaces.data.IObjectData` interface), like this::
 
         <div tal:attributes="data-ams-data extension:object_data(context)">...</div>
     """
@@ -95,8 +87,6 @@
     This TALES extension can be used to get a request data, previously stored in the request via an annotation.
     For example::
 
-    .. code-block:: html
-
         <div tal:content="extension:request_data('my.annotation.key')">...</div>
     """
 
@@ -112,8 +102,6 @@
     This TALES extension can be used to get a request data, previously stored in the request via an annotation.
     For example::
 
-    .. code-block:: html
-
         <div tal:content="extension:request_data('my.annotation.key')">...</div>
     """