That is true Diez.. but am just following the tutorial here ..
http://turbogears.org/2.1/docs/main/ToscaWidgets/Using.html

<http://turbogears.org/2.1/docs/main/ToscaWidgets/Using.html>Thanks for
replying!
Vivek

On Sun, Jul 11, 2010 at 9:00 PM, Diez B. Roggisch <[email protected]> wrote:

>
> Am 11.07.2010 um 17:12 schrieb vivek:
>
>
>  Hii!
>> I just started working on turbogears.. actually am learnig by
>> following the documentation. Am stuck up on this tutorial where it has
>> been explained on how to use tw.rating to enable star rating widget on
>> the template.I did the following:-
>> installed tw.rating
>> 1.easy_install tw.rating
>>
>>
>> 2.from tw.rating import Rating
>> 3.my_rating = Rating(id='my_rating', action='rating', label_text='')
>> (in the controller)
>> 4.
>> @expose('genshi:myproject.templates.ratings')
>> def testing(self, **kw):
>>   tmpl_context.widget = my_rating
>>   return dict()
>>
>> 5. created a template named ratings.html and inserted the following
>> code
>>   ${tmpl_context.widget(value)}
>> (( all the above steps are as explained in the tutorial on this link :-
>> http://turbogears.org/2.1/docs/main/ToscaWidgets/Using.html))
>>
>> However when i go to localhost:8080/testing .. i get "UndefinedError:
>> "value" not defined"  ..  .. I have posted the controller and template
>> codes here  http://pastebin.com/2hqFj6t3
>>
>> The traceback of the error is here...http://pastebin.com/tvXDpFft
>>
>> I know am doing something really silly, but can someone please,please
>> look into it and help me. Have done enough googling but no help. And
>> yes the default templating is genshi.
>>
>
> You pass a name "value" to the widget in your template. But you don't
> return value as part of the testing-controller.
>
> I have no idea what tw.rating does, nor what the value the widget might or
> might not get is supposed to look.
>
> Diez
>
>
> --
> 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]<turbogears%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>

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