ext/tal.py
changeset 8537 e30d0a7f0087
parent 5424 8ecbcbff9777
child 8695 358d8bed9626
equal deleted inserted replaced
8535:268b6349baf3 8537:e30d0a7f0087
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
   259             else:
   259             else:
   260                 return html
   260                 return html
   261         return wrapped
   261         return wrapped
   262 
   262 
   263     def _compiled_template(self, instance):
   263     def _compiled_template(self, instance):
   264         for fileordirectory in instance.config.vregistry_path():
   264         for fileordirectory in instance.config.appobjects_path():
   265             filepath = join(fileordirectory, self.filename)
   265             filepath = join(fileordirectory, self.filename)
   266             if isdir(fileordirectory) and exists(filepath):
   266             if isdir(fileordirectory) and exists(filepath):
   267                 return compile_template_file(filepath)
   267                 return compile_template_file(filepath)
   268         raise Exception('no such template %s' % self.filename)
   268         raise Exception('no such template %s' % self.filename)
   269     _compiled_template = cached(_compiled_template, 0)
   269     _compiled_template = cached(_compiled_template, 0)