# HG changeset patch # User Thierry Florac # Date 1432118090 -7200 # Node ID 5c27fa323effe63b6e60b9bce0c3c92155b7c1ba # Parent 95b8b181c3adef5b2ae1a765ff13568d177e354f Added default container values adapter diff -r 95b8b181c3ad -r 5c27fa323eff src/pyams_skin/table.py --- a/src/pyams_skin/table.py Wed May 20 12:34:23 2015 +0200 +++ b/src/pyams_skin/table.py Wed May 20 12:34:50 2015 +0200 @@ -19,8 +19,8 @@ from pyams_skin.interfaces.container import ITable, ITableElementEditor, ITableWithActions, ITableElementName from pyams_skin.layer import IPyAMSLayer from pyams_viewlet.interfaces import IViewletManager -from z3c.table.interfaces import IColumn -from zope.container.interfaces import IContained +from z3c.table.interfaces import IColumn, IValues +from zope.container.interfaces import IContained, IContainer # import packages from pyams_template.template import get_view_template, template_config @@ -87,9 +87,7 @@ @staticmethod def check_data_attribute(attribute, source): - if isinstance(attribute, str): - return attribute - elif callable(attribute): + if callable(attribute): return attribute(source) else: return str(attribute) @@ -121,6 +119,15 @@ .replace('