Yep, it looks like a bug... Can you please try removing the  
strip="True" from the template?
Alberto
On Feb 17, 2006, at 7:17 AM, Max Ischenko wrote:

>
>>  obj needs to be a dict with the values that need to be sent to the
>> template to prepopulate the form. An SQLObject is not currently
>> supported.
>
> I changed my code to:
>
> class InlineWidget(widgets.SimpleWidget):
>     def __call__(self, obj):
>         return self.display({'book':obj.book})
>
> Got NameError: name 'book' is not defined
>
> I changed the code to
> class InlineWidget(widgets.SimpleWidget):
>     def __call__(self, obj):
>         value = dict(value=dict(book=obj.book, item=obj))
>         return self.display(value)
>
> Template text (uncut):
> <div xmlns:py="http://purl.org/kid/ns#"; py:strip="True">
>   <?python
>   print value['value']['book']
>   print value['value']['item']
>   ?>
> </div>
>
> It prints book, item OK but then fails with:
> current.text = item
> AttributeError: 'list' object has no attribute 'text'
>
> Looks like a bug to me.
>
>
>


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to