You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
@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
The text was updated successfully, but these errors were encountered: