On Jun 23, 4:42 am, Chris <[EMAIL PROTECTED]> wrote:
> I have a very simple Kid template with the tag:
>
> <title> Viewing ${video.video_name}</title>
>
> which CherryPy complains, "AttributeError: 'SelectResults' object has
> no attribute 'video_name'"

It looks video is a SelectResults (a list of records) , not a records.
You can fetch_one() or fetch() (I thing dont remeber well SqlObject)
to get one record.
>
> However, if I replace this tag with:
>
> <title> ${video}</title>
>
> then the page shows the whole record, including the attribute that
> supposedly doesn't exist:
>
> <title> &lt;Video 1 video_name=u'Fast Car' video_title=u'Fast Car'
> video_description='u"It\'s about a fa..."'
> created='datetime.datetime...)' numeric_id=88105></title>
>
> All the examples in the Wiki use the syntax ${page.pagename}. What am
> I doing wrong?
>
> Thanks,
> Chris


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