# 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::