"Max Ischenko" <[EMAIL PROTECTED]> writes:
> Hi Jorge,
>
> You can achieve this without changing FastDataGrid and satisfying "Law
> of Demeter" along the way by adding a property that will delegate to
> its attribute's property, e.g.:
>
> class Analise:
> def _get_descricao(self):
> return self.segmento.descricao
> descricao = property(fget=_get_descricao) # not needed with SQLObject
>
> grid_analises = datawidgets.FastDataGrid(
> fields = [
> (lazy_gettext('Segmento'), 'descricao'),
> ...])
I can't do that. Analise already has a 'descricao' field. And it would make
me loose the 'magic' that SQLObject already does. There are means to
programatically achieve that, of course, but I believe that this should be
fastdatagrid's default behaviour.
--
Jorge Godoy <[EMAIL PROTECTED]>