On 9/3/07, skyogre <[EMAIL PROTECTED]> wrote: > > Hi. > > I liked the turbogears style of templates usage. Decorators are used > to specify the template and function flash() or exceptions are used to > display the result of the operation. > > Is there a way to get the similar usage in pylons-based code?
You can import and use the TurbogearsController and decorators from turbogears two in pylons now. And Mike Orr has done a good job of explaining how that works in a post in this thread. If you don't want to use tg style dispatch but you want the decorators you can adapt the TG2 controller code very easily not do object dispatch, while still allowing you to use the tg2 decorators. In fact if you do such a thing I'd love to host and support it as an intermediary between tg2 style development and pylons style development. And if you don't I'll probably create one eventually. :) Be aware though that tg2 decorators are register desired behavior and the controller does the real work (this is very different from the way it worked in TurboGears 1). So you need to look at what's being done in the controller as well as at the decorators. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
