On 4/7/12, Carlos Daniel Ruvalcaba Valenzuela <[email protected]> wrote:
>> *Turbogears-2.1.5/tg/dottednames/jinja_lookup.py*
>>
>> 20        # Check if dottedname
>> 21        if not template.endswith('.html'):
>> 22            # Get the actual filename from dotted finder
>> 23            finder = config['pylons.app_globals'].dotted_filename_finder
>> 24            template = finder.get_dotted_filename(
>> 25                template_name=template,
>> 26                template_extension=self.template_extension)
>> 27        else:
>> 28            return FileSystemLoader.get_source(self, environment,
>> template)
>>
>>
> This certainly look different  to what I have on my repo (215 branch), the
> template extension is factored out on a class variable called
> template_extension.
>

Also the released 2.1.5 has the template_extension class variable, so
that is not strictly the 2.1.5 code. Probably he changed it while
pasting it to make more obvious the issue.

>
> I could prepare a patch to set the template extension if that is what you
> need, but it may get merged later.
>

That it probably a good idea anyway.
It would permit to use dotted loader with any kind of extension
instead of only the default one. We can probably store a dictionary
with extensions to use for each template engine inside the tg.config
(so that the user is able to change it inside the app_cfg.py) and use
that for choosing the template extension inside the loaders.

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

Reply via email to