Ian Wilson wrote:
> An array or dictionary does not have a retrieve_css,
> retrieve_javascript attribute so it just gets skipped when pulling css
> and javascript. I kind of like how I do things now but I guess there
> is no real reason to do it.
I think your original need was valid as I have just been banging my
head against the wall with a similar problem. If I pass a list of
widgets through to the template they get displayed ok (I loop over them
calling w.display()) but the CSS links do not get added to the page.
I can force this to work using a list subclass that has a retrieve_css
method. Using this in place of the list solves the problem because the
object contains a retrieve_css method which just needs to pull the CSS
objects out of its children.
class WidgetList(list):
def retrieve_css(self):
csslist = []
for w in self:
for css in w.retrieve_css():
csslist.append(css)
return csslist
Cheers,
Chris Miles
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---