Mark Ramm schrieb:
> But when the docs are completed they willl be here:
> 
> http://www.turbogears.org/2.0/docs/main/Templates/Alternative.html#writing-your-own-render-function

Great. I can do some proof-reading then.

>> And there are some pitfalls. For instance, you cannot name your
>> rendered like one of the default renderers, even if you intend to
>> replace one of these, because this entry will be overwritten. You
>> also cannot reuse the default renderer function in your own
>> function (unless you directly import it) because in the config file
>> they have not yet been set up.
> 
> I don't think they won't be overwritten if you don't have them in the
>  list of renderers to prepare.

What I wanted to say is that you can't simply set

base_config.render_functions.genshi = my_render_genshi

since this will be overwritten with the default render_genshi function.
You need to do the following:

base_config.render_functions.my_genshi = my_render_genshi
base_config.renderers.append('my_genshi')
base_config.default_renderer = 'my_genshi'

I think the setup_* methods in AppConfig should not overwrite 
render_functions that are already set.

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
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