TurboGears / tgext.pluggable

Pluggable applications support for TurboGears2
11 stars 13 forks source link

TypeError: render_mako() got an unexpected keyword argument 'doctype' #1

Closed ltrillaud closed 11 years ago

ltrillaud commented 11 years ago

tgext.pluggable doesn't work with turbogears 2.2.0 with mako as default renderer.

Step to reproduce :

The problem is in Module tgext.pluggable.utils:42 in call

you call tg_render with doctype return tg_render(template_vars=result, template_engine=engine_name, template_name=template_name, doctype=None)

That doesn't exist in Module tg.render:183 in render kwargs['result'] = render_function(template_name, tg_vars, **kwargs)

and produce exception TypeError: render_mako() got an unexpected keyword argument 'doctype'

Here is the prototype for mako def render_mako(template_name, globs, cache_key=None, cache_type=None, cache_expire=None):

A quick and dirty workaround is to remove doctype=None in tgext.pluggable.utils:42

Thanks

Laurent

amol- commented 11 years ago

I can confirm this issue, I'll try to make a new pluggable release that fixes this today,

amol- commented 11 years ago

38f60382a31bc745e97ffd69452b5c2809b5f091 provides fix for the issue which is available in tgext.pluggable 0.1.2

ltrillaud commented 11 years ago

Congratulation. You are as fast as lightning. It's works like a charm. Cheers.