On Sat, Sep 5, 2009 at 11:26 AM, Techniq<[email protected]> wrote:
>
> I'm wondering what happened to the old of specifying genshi options in
> *.ini?
>
> # development.ini
> genshi.default_dectype = xhtml-strict
> genshi.default_format = xhtml
>
> this no longer works.  Is there now another way to accomplish this?
> TemplateLoader doesn't accept this options and the only place I see
> this in Genshi's source is plugin.py:MarkupTemplateEnginePlugin class.

The old template configuration system (Buffet) is still available as
pylons.templating.render().  But it's buggy and limited and going away
in Pylons 1.0, so I wouldn't use it.

If you create a new application and answer "genshi" to the template
question, it will give you the code to configure a Genshi template
loader in myapp/config/environment.py, which you can paste into your
application.  Then put "from pylons.templating import render_genshi as
render" in your controllers.

I don't use Genshi so I'm not sure how to set those specific options.
You may be able to give them to the template loader, or you may have
to wrap or re-implement render_genshi to set them,  A couple URLs that
might help:

http://pylonshq.com/docs/en/0.9.7/views/  (section "Custom render() functions")
http://pylonsbook.com/en/1.0/using-view-templates.html (section
"Alternative Template Languages")

-- 
Mike Orr <[email protected]>

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

Reply via email to