Esempio n. 1
0
 def _json_values(self, nodes):
     values = []
     for node in nodes:
         d = {}
         for field in workspace_fields:
             d[field.name] = getattr(IWorkspaceContentAdapter(node),
                                     field.name, None)
         d["object_id"] = url.set_url_context(node.__name__)
         values.append(d)
     return values
Esempio n. 2
0
 def query(item, formatter):
     return getattr(IWorkspaceContentAdapter(item), name, None)