<link for=\"css in tg_css\" replace=\"css.display()\">
<link for=\"js in tg_js_head\" replace=\"js.display()\">
Now, if you're silly, like me, and don't really pay attention, you just include it, without looking too hard at your master template, which includes these lines by default:
<link for=\"css in tg_css\" replace=\"ET(css.display())\">
<link for=\"js in tg_js_head\" replace=\"ET(js.display())\">
As soon as you put the widget in your controller:
from toscawidgets.widgets.mochikit import mochikit
class Root(controllers.RootController):
@expose("genshi:mumapp.templates.sections")
def info(self):
return dict( form = InformationForm,
js = mochikit )
You start to get funny Genshi errors, mine was "AttributeError: 'Stream' object has no attribute 'tag'" which prompted me to try various combinations of adding ET() and HTML() to my templates, when the problem was that Toscawidgets cleans that whole ET/Genshi issue up and breaks when you leave them in.
So, long story short, add the site template and remove the conflicting lines from your master template. (Though, if you are mixing Toscawidgets and Turbogears widgets, you'll have to do something like what's outlined here.)
No comments:
Post a Comment