On 1/11/07, Alberto Valverde <[EMAIL PROTECTED]> wrote: > > It's a good idea, however, I would not bother too much with patching > the trunk with this ATM because (apart that you'll probably lose much > hair ;) decorators are going to be rewritten in a much simpler way > (just registering behaviour and returning the orginal, undecorated > function) so any changes will be probably lost. >
I *don't* think it's a good idea. Controllers are exposed for a reason, they're supposed to be called by the web and at no point will you want your exposed method to return python objects - the browser will not know how to deal with it (and neither will cherrypy for that matter). The reason exposed methods return a string is because your data is automatically JSONified for you. If you want something extensible, create a function that does all the heavy lifting and returns your data how you want it, then use an exposed method to wrap it. That way you can use the wrapped function in any other part of your application or, in fact, any application at all. Lee -- Lee McFadden blog: http://www.splee.co.uk work: http://fireflisystems.com skype: fireflisystems --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to turbogears-trunk@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---