You cannot format it like a table but you can
represent=lambda r: DIV(SPAN(r.field1,_class="col1"),SPAN
(r.field2,_class="col2"))
and in css
SPAN .col1 {width: 200px}
SPAN .col1 {width: 200px}
Massimo
On Dec 6, 8:26 am, billf <[EMAIL PROTECTED]> wrote:
> If you look at the default represent() in t2.py you can see how to do
> whatever you want. Maybe the default is what you want(?)
>
> On Dec 6, 2:09 pm, Julius Minka <[EMAIL PROTECTED]> wrote:
>
> > yes, I know.
> > I do it this way:
>
> > db.puppy.represent=lambda row: \
> > P(A(row.name,_href=t2.action('display_puppy',[row.id])),SPAN(row.age))
>
> > The only trouble is, that it is not formattted like a table:
> > dog1
> > doggie2
>
> > I need
> > dog 1
> > doggiw 2
>
> > Julius
>
> > On So, 2008-12-06 at 05:35 -0800, billf wrote:
>
> > > are you using t2? The t2 manual describes doing this by
>
> > > db.mytable.represent=lambda row: '%s %s' % (row.myfield,row.id)
>
> > > which I have used and it works fine.
>
> > > On Dec 6, 10:08 am, Julius Minka <[EMAIL PROTECTED]> wrote:
> > > > How can I format itemize output to a table (regular structure of
> > > > columns)? I am showing more columns on the line.
> > > > Something similar to default view for records...
> > > > Thanks
> > > > Julius
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---