On Thu, Jul 31, 2008 at 8:30 PM, Mark Ramm <[EMAIL PROTECTED]> wrote:
>
> If you do an empty expose there's nothing to parse the returned
> dictionary (no template is defined)
>
> So you have to return a string, but you can do:
>
>  @expose()
>  def save(self,**kwargs):
>       return str(kwargs)


Empty expose is causing me problems again.

I have following function:
 @expose()
    def list(self, **kw):
        all=DBSession.query(Addressbook).all()
        print str(all)
        return str(all)

I can see my print statement showing:
[<addressbook.model.address.Addressbook object at 0x1e3c990>,
<addressbook.model.address.Addressbook object at 0x1e3ca10>]

but my return str(all) shows up empty in localhost:8080/list
[, ]

How can that be? Am I doing something wrong here. Is there a reason
the expose() shows [,] instead of
[<addressbook.model.address.Addressbook object at 0x1e3c990>,
<addressbook.model.address.Addressbook object at 0x1e3ca10>]


Thanks,
Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to