On Jan 19, 2007, at 8:16 AM, jose wrote:
I'm using version 1.0
The following lines in my start.py changes tg behavior about using
kid/genshi.
import toscawidgets
from toscawidgets.mods.tg import Turbogears
toscawidgets.framework = Turbogears(None)
Whithout these lines I have no more the errors:
ValueError: need more than 2 values to unpack
or
ValueError: too many values to unpack
and I am able to use genshi and kid as in version 1.0b2 but
ToscaWidgets.
Could someone tell me please, how to configure my tg to use
ToscaWidgets and widgest with genshi and kid?
Take a look at http://tinyurl.com/37hm2t.
ToscaWidget's Widget.display function automatically converts kid/
genshi streams into string output and viceversa to allow mixing
template engines. When a widget is root (it's not displayed inside
any other widget) it looks at toscawidgets.framework.default_view to
see the template engine root widgets are displayed on. In TG it
delegates to the tg.default_view config option by default, if you
want to display a TW in a non-default template engine you must set
that attribute manually before rendering the template (yes, it is
threadsafe and the change will only last for the duration of a request).
Alberto
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---