[tg-trunk] Re: @before_render and @after_render

2009-01-17 Thread Lee McFadden
You could use the custom_format parameter to achieve the same thing with less code: from tg.decorators import use_custom_format class MyCrazyController(TGController): def __init__(self, is_shouting=False): self.is_shouting = is_shouting @expose('genshi:regular_template',

[tg-trunk] Re: @before_render and @after_render

2009-01-16 Thread percious
Sorry, I missed an if in the code that makes it clearer. class MyCrazyController(TGController): def __init__(self, is_shouting=False): self.is_shouting = is_shouting self.default_engine = self.index.decoration.engine['text/ html'] def shouting(self, *args, **kw):