Commit 8227de53 authored by Jérome Perrin's avatar Jérome Perrin

core: use pprint.pformat to pretty print activity message_list

using json in 37b795fb was wrong,
because not all arguments can be converted to json (for example
DateTime instances)

This also enable the format using pprint.pformat for args, instead
of a simple str that was done in ActivityTool_getMessageList.
parent b721632e
......@@ -13,7 +13,6 @@ for message in message_list:
message.edit(
str_object_path = '/'.join(message.object_path),
uid_activity = str(message.uid) + ' ('+ message.activity[3:] +')',
arguments = str(message.args),
delete = '[Delete]',
restart = '[Restart]',
)
......
......@@ -83,7 +83,7 @@
<string>listbox_call_traceback</string>
<string>listbox_activity_kw</string>
<string>listbox_kw</string>
<string>listbox_arguments</string>
<string>listbox_args</string>
</list>
</value>
</item>
......
......@@ -127,7 +127,7 @@
<string>Activity Kw</string>
</tuple>
<tuple>
<string>arguments</string>
<string>args</string>
<string>Arguments</string>
</tuple>
<tuple>
......@@ -278,7 +278,7 @@
<string></string>
</tuple>
<tuple>
<string>arguments</string>
<string>args</string>
<string></string>
</tuple>
<tuple>
......
......@@ -125,7 +125,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: modules[\'json\'].dumps(cell.activity_kw, indent=True)</string> </value>
<value> <string>python: modules[\'pprint\'].pformat(cell.activity_kw)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -11,13 +11,14 @@
<value>
<list>
<string>css_class</string>
<string>default</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_arguments</string> </value>
<value> <string>listbox_args</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -53,6 +54,16 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -65,6 +76,10 @@
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -76,6 +91,10 @@
<key> <string>css_class</string> </key>
<value> <string>pre</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_area_field</string> </value>
......@@ -98,4 +117,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: modules[\'pprint\'].pformat(cell.args)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -125,7 +125,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: modules[\'json\'].dumps(cell.kw, indent=True)</string> </value>
<value> <string>python: modules[\'pprint\'].pformat(cell.kw)</string> </value>
</item>
</dictionary>
</pickle>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment