# HG changeset patch # User Sylvain Thénault # Date 1316710959 -7200 # Node ID 6f32f142e2da27d3a3649a51720652eff8cb0232 # Parent 0ada13ce2e16398510455c3e9b4121f61c41d11c [primary sub views] use entity_call instead of cell_call diff -r 0ada13ce2e16 -r 6f32f142e2da web/views/primary.py --- a/web/views/primary.py Thu Sep 22 19:02:36 2011 +0200 +++ b/web/views/primary.py Thu Sep 22 19:02:39 2011 +0200 @@ -1,4 +1,4 @@ -# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -353,8 +353,7 @@ __regid__ = 'urlattr' __select__ = EntityView.__select__ & match_kwargs('rtype') - def cell_call(self, row, col, rtype, **kwargs): - entity = self.cw_rset.get_entity(row, col) + def entity_call(self, entity, rtype, **kwargs): url = entity.printable_value(rtype) if url: self.w(u'%s' % (url, url)) @@ -370,8 +369,7 @@ __regid__ = 'attribute' __select__ = EntityView.__select__ & match_kwargs('rtype') - def cell_call(self, row, col, rtype, role, **kwargs): - entity = self.cw_rset.get_entity(row, col) + def entity_call(self, entity, rtype, **kwargs): if self._cw.vreg.schema.rschema(rtype).final: self.w(entity.printable_value(rtype)) else: