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',
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):