Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require explicit engine_name when .html extension is used #32

Open
ralphbean opened this issue Jun 14, 2012 · 0 comments
Open

require explicit engine_name when .html extension is used #32

ralphbean opened this issue Jun 14, 2012 · 0 comments
Labels

Comments

@ralphbean
Copy link
Contributor

@amol- reported this in #turbogears


16:49:33 < amol> threebean: a TG user found an interesting issue with tw2 that raised up only recently, probably after template management change in tw
16:49:45 < amol> it seems that instead of rendering the genshi template of a widget
16:49:53 < amol> it outputs the actual genshi code
16:50:19 < amol> is there anthing that comes to your mind that might cause this issue?
16:50:36 < amol> do I have to change something in the way TG initializes tw2 now?
17:01:27 < amol> Ok, I found the issue :/
17:08:26 < amol> The issue is that if my widget has a genshi template with .html extension and my application (as it uses jinja) has tw2 configured with ['jinja',
'genshi'] preferred templates then tw2 tries to render the template as a Jinja2 template as .html is one of the extensions accepted for Jinja2
17:09:24 < amol> As .html is an extension registed as valid for kajiki, genshi and Jinja2 in tw2.core.middleware.Config by default
17:09:55 < amol> I would suggest requiring to explicitly say the engine_name when .html extension is used, otherwise it would be impossible to render the widget with
the correct engine
17:37:09 < amol> the same issue happens with standard tw2 widgets as far as I see
17:38:00 < amol> as also input_field and so on provide a genshi template which ends with .html extension
17:52:52 < amol> the rendering_extension_lookup option is also totally ignored when looking up for templates, so even changing it doesn't have any effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant