Mark Ramm schrieb:
> Right now it is easy to write a render method that configures and uses
> genshi however you want. And your custom render method can be stuck
> in the renderers dictionary and even set as the default renderer.
I think it's not so easy because it is not documented anywhere. 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.
> This allows total flexibility in how genshi, mako, jinja2, and
> whatever other template engine you want to use are setup -- and does
> not limit you to a common subset of features supported by buffet.
My feeling is that we have thrown away the baby with the bathwater here.
It was in fact possible to provide options specific to one
templating engine with buffet. If it had shortcomings, buffet should
have been improved instead of completely throwing it away. I guess the
problem was that nobody cared about buffet because nobody felt
responsible. Maybe we as TG community should have better enforced and
improved the buffet standard. But I guess it's probably too late already.
> But it would probably be a good idea to have a few simple options for
> the three default renderers so you don't even have to write the couple
> of lines of code required to create your own renderer for those common
> cases.
Either that or the couple of lines that you need to add should be
clearly documented with some examples. Best let's do both. (Just saw
that there is already a ticket http://trac.turbogears.org/ticket/2137
and added a comment. I think its priority should be set to high again.)
-- 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
-~----------~----~----~----~------~----~------~--~---