# HG changeset patch # User Thierry Florac # Date 1527251276 -7200 # Node ID d4a0668c7ee0ccc4ac22c2a1ce403adff771deb8 # Parent 5e239a213d1d6b089fee55e67059581669d2aac4 Updated docstrings diff -r 5e239a213d1d -r d4a0668c7ee0 src/pyams_utils/data.py --- a/src/pyams_utils/data.py Fri May 25 11:26:13 2018 +0200 +++ b/src/pyams_utils/data.py Fri May 25 14:27:56 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 -
...
"""