On Sat, 2007-15-12 at 23:28 +0000, Alberto Valverde wrote:
> iain duncan wrote:
> > I got toscawidgets working in the python shell ( as in I could call and
> > render a widget ) and in the pylons simple toscawidget example, where
> > the widget gets attached to that handy 'c' object. Couldn't figure out
> > what to do in TG2 though. Doing the regular tg way gives me the
> > following traceback from *paster* ( the browser screen just hangs )
> >
> > TypeError: No object (name: ToscaWidgets per-request storage) has been
> > registered for this thread
>
> Did you stack TW's middleware in middleware.py?
>
This is what comes in middleware.py as of a checkout 3 days ago:
# Configure the Pylons environment
load_environment(global_conf, app_conf)
# Create the TurboGears WSGI app stack
app = TurboGearsApplication(RootController())
# Add Session and Cashing support
app = SessionMiddleware(app, config)
app = CacheMiddleware(app, config)
#Configure and add ToscaWidgets support
host_framework = PylonsHostFramework(default_view="genshi")
app = TGWidgetsMiddleware(app, host_framework)
I assumed from the commment, that that was enough. Am I missing
something in there? Am I supposed to explicitly attach the widget to
thread local something or another somewhere?
Does anyone have a working TG2 with toscawidget example I could look
over?
Iain
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---