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.

Regards
Vivek

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