3) provide a patch, so it might end up in SQLTABLE ? On Tue, Jun 9, 2009 at 6:57 PM, mdipierro<mdipie...@cs.depaul.edu> wrote: > > There is no may to make a SQLTABLE taht fits everybody's taste and > needs. I think you should > > 1) define your own SQLTABLE2, or > 2) loop over rows explicitly > > Massimo > > On Jun 9, 11:50 am, AchipA <attila.cs...@gmail.com> wrote: >> Just been through some TABLE() and SQLTABLE() work and could not find >> a way (I was satisfied with) to change output results of particular >> columns. For example, I have an sql column that is a color code and >> I'd like to put in a css element with that color. The hard way is >> obviously foregoing the {{=table}} and looping through all the >> components, changing the ones you need, but this produces mighty ugly >> views. Is there a more intelligent/recommended way of doing this ? >> >> If not, I'd like to suggest something like a per-column map function, >> similar to what we have for upload columns now. For example >> >> SQLTABLE(result=result, map={'colorcol': mycolorfunc, 'linkcol' : >> lambda x: A(_href=x), 'bigfloatcol' : lambda x: "%.2f" % x} ) >> >> The same could work for TABLE() if they have a header row to identify >> columns. >> This could be also useful for views, too, imagine: >> >> {{table.map['badlyformattedcol'] = goodformatfunc}} >> {{=table}} >> >> Comments, suggestions, recommendations ? > > >
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---