# HG changeset patch # User Damien Correia # Date 1527254483 -7200 # Node ID 86d0f27c7f46e869a7808e60dd9a281d13f5d75c # Parent a958ccc01e404f2b280706af17a688d638d58a70# Parent d4a0668c7ee0ccc4ac22c2a1ce403adff771deb8 merge default diff -r a958ccc01e40 -r 86d0f27c7f46 src/pyams_utils/data.py --- 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::
...
-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::
...
""" @@ -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::
...
""" @@ -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 -
...
""" @@ -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 -
...
"""