Hi, Based on Chameleon documentation, I'm trying to write a custom "provider:" TALES expression which will allow to load another content provider template, based on a registered named adapter. The code is as follow:
class ProviderExpression(object): """provider: TALES expression""" def __init__(self, expression): self.expression = expression def __call__(self, target, engine): request = get_current_request() registry = request.registry provider = registry.queryMultiAdapter((request.context, request, request.annotations['view']), IContentProvider, name=self.expression) if provider is None: raise ContentProviderLookupError(self.expression) provider.update() value = ast.Str(provider.render()) return [ast.Assign(targets=[target], value=value)] PageTemplateFile.expression_types['provider'] = ProviderExpression My problem with this is simple: when the main template is loaded for the first time, everything is OK. But afterwards, the output of the content provider is cached and the dynamic elements are not executed anymore! What is the way to handle this? Best regards, Thierry -- http://www.imagesdusport.com -- http://www.ztfy.org -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.