Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Renderer Using A Chameleon Macro Name renders whole template after pyramid reloads the template #1013
If you have a renderer as such:
and then change foo.pt, the renderer renders the entire foo.pt template on subsequent requests.
As far as I can tell this only applies to when pyramid.reload_templates is True.
So I've found the cause of this, but not any kind of reasonable solution. It might involve a fix in chameleon as well. The offending code is here in chameleon_zpt.py
This code is reified and returns the same PageTemplateFile object every time. But to get the macro rendering, pyramid changes the tf._render object after creating the object. But when chameleon goes to reload the template when it's changed (since it's chameleon, not pyramid doing that) it blows away the change to tf._render.