Hi!


How hard would it be to make datawidgets.FastDataGrid to look at least one
more level in its column declaration?  My code could read:

================================================================================
grid_analises = datawidgets.FastDataGrid(
    fields = [
    (lazy_gettext('Segmento'), 'segmento.descricao'),
    (lazy_gettext('Material Coletado'), 'materialColetado.descricao'),
    (lazy_gettext(u'Mnemônico'), 'mnemonico'),
    ],
    )
================================================================================

instead of

================================================================================
def analise_segmento(analise):
    return analise.segmento.descricao


def analise_material_coletado(analise):
    return analise.materialColetado.descricao


grid_analises = datawidgets.FastDataGrid(
    fields = [
    (lazy_gettext('Segmento'), analise_segmento),
    (lazy_gettext('Material Coletado'), analise_material_coletado),
    (lazy_gettext(u'Mnemônico'), 'mnemonico'),
    ],
    )
================================================================================

if it used a syntax similar to SQLObject's.  I also have other things like
this as well in other datagrids (and I know I can use lambda but it really
isn't as obvious as the same syntax provided by SQLObject...).

This could be something to improve for this specific widget... 


-- 
Jorge Godoy      <[EMAIL PROTECTED]>

Reply via email to