No need to apologize ever! We all learn by asking - there's enough to know
that everyone is "ignorant" about _something_ ;-)
After all, that's what friends are for!
On Sat, Nov 8, 2008 at 10:19 PM, billf <[EMAIL PROTECTED]> wrote:
>
> Many thanks. As you can see I'm still missing some Python basics. I
> wonder sometimes that any of my code works :-)
>
> On Nov 9, 1:02 am, mdipierro <[EMAIL PROTECTED]> wrote:
> > return DIV(items)
> >
> > should be
> >
> > return DIV(*items)
> >
> > In the first case you are passing a list to the DIV and the list is
> > serialized. In the second case you are passed the list elements to the
> > DIV, as should be.
> >
> > Massimo
> >
> > On Nov 8, 6:51 pm, billf <[EMAIL PROTECTED]> wrote:
> >
> > > I know this is a weak question but I can't seem to get my head around
> > > it. I want to code something like the following in a view html file:
> >
> > > {{=object.method()}}
> >
> > > ...and get some valid html included in the view. Let's say I want a
> > > label, a value and a <br/>. I expect the method to look something
> > > like:
> >
> > > from html import *
> > > def method():
> > > items=[]
> > > items.append(LABEL('MYLABEL'))
> > > items.append('some value')
> > > items.append(BR())
> > > return DIV(items) # I have also tried DIV(items).xml()
> >
> > > ... but I never seem to get the html - I just see gluon.html.LABEL
> > > etc. What am I doing wrong?
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---