Hello,
what about this strategy based on  tg.decorators.Decoration

I use
register_custom_template_engine(custom_format, content_type, engine,
template, exclude_names)


to register my own custome_engine for my own custom_format  (aka the
previouly paster code for instance used with custom_format= "jsone")

On before_render I look if tg_flash exists, if so, I change the
custom_format (switching to whatever format was set (json/jsonp/mako
to my own) with an override_mapping) ?

BTW in your hook there is this magical override_mapping dict that
seems to be global in the context of the before render hook. Is it
really a dirty mean magical global variable it looks like ?

Cheklist to achieve my goal

* writing code for an engine : hum .... Not sure I know what it's API is
* checking for tg.flash : OK :)
* writing a before_hook with override_mapping : OK :)

What about this plan ?

-- 
Hf, gl
Julien Tayon

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en.

Reply via email to