11 Nov
1999
11 Nov
'99
4:53 p.m.
Evan Gibson wrote:
Also, one thing that annoys me... With sql_methods I have to go:
sql.get_skin(username='default')[0].skin
even when the only thing the sql statement is returning is a single value and it's value _is_ ".skin".
Actually, I think DTML can express this quite well. If you know there's only one result (as you do here, because you're hardcoding the [0]) You can get clean DTML with an #in block: <dtml-in "sql.get_skin(username='default')"> <dtml-var skin> </dtml-in> Little extra typing, but it looks clean to me. ;) -Michel