Thx, this is a stupid mistake. I found another error in
mako.ext.turbogears
to get mako working I rewrote load_template func
here is code
you have to
import os
import pkg_resources
def load_template(self, template_name, template_string=None):
"""Loads a template from a file or a string"""
divider = template_name.rfind(".")
if divider > -1:
package = template_name[0:divider]
basename = template_name[divider+1:]
else:
raise ValueError, "All templates must be in a package"
template_file_path = pkg_resources.resource_filename(package,
"%s.%s" %
(basename,self.extension))
mdir,mfile=os.path.split(template_file_path)
if mdir not in self.lookup.directories:
self.lookup.directories.append(mdir)
if not self.lookup.module_directory:
self.lookup.module_directory=os.path.join(mdir,'mako_modules')
# Lookup template
return self.lookup.get_template(mfile)
These code is could be made more generic but it works for me
I will try to get this to mako mailing list
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---