On Mon, Jun 22, 2015 at 6:12 PM, Diego García <[email protected]>
wrote:

> I am using Mako templates, is it necessary to use Genshi to make comments
> work?
>

Usually tgapp-* have only been tested and work with Genshi. The more recent
pluggable apps usually support being used from an app that uses another
template engine while they continue to use Genshi, but that is not true for
all of them.


> Blog have installed you with Mako and not it has caused me problems,
>

That's because as far as you have Genshi installed tubopress will use it,
so your own pages will be in Mako while turbopress pages will be in Genshi.
You can freely mix them so there is no particular issue in doing that.


> as really I am stuck with the comments.
>
> This is the error that get me, when I add the line
> ${h.call_partial('tgcomments.partials:comments_for', entity=article)}
>
> in the template of article.html turbopress
>
> TemplateLookupException: Cant locate template ' /
> home/diegogarcia/regina/local/lib/python2.7/site-packages/tgcomments/templates/comments_partial.mak'
>
> But I do not understand that it is asking for a file named
> comments_partial.mak', what have to do with anything else?
>

tgcomments asks for the "comments_partial" template and as you have mako as
your default template engine TurboGears will look for the mako template
named "comments_partial" which doesn't exist as tgcomments uses Genshi.
That is because tgcomments doesn't specify the template engine that should
be used inside partials, so your application default is used, which is Mako.

It should suffice to update tgapp-tgcomments to explicitly use Genshi
independently from your app engine, so that while tgcomments uses genshi
you can use it inside apps that use another template engine. I'll try to
update that and roll out a new release this evening so you should be able
to call tgcomments partials from your app even when you are not using mako.

Just pay attention that tgcomments is probably not the only one that works
only on Genshi, and while I'll gladly update the pluggable apps I have
commit access to work on Mako too, there are some I'm not involved in which
might not work on Mako too.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to