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?
Ok, my fault! I mixed up mywidget.display() and mywidget.render() and in this case did not get a traceback as useful as the CP one. ( which complains about wrong return type when you do that ). Returning mywidget.render is working fine. Now I dunno if anyone cares, but if you ( incorrectly ) try to return mywidget.display() from a tg2 controller, the request hangs and paster chokes. Not immediately obvious what went wrong. So, I have a widget, (yay!) but I don't know how to validate it based on today's emails. Sounds like that is still up in the air a bit. Anyone got an example of any method that will work for the present to validate from a widget and redirect errors? 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 -~----------~----~----~----~------~----~------~--~---
