After hunting down a very elusive bug, I found the cause to be due to the fact that render_to_string leaves the context in a different state than it started (due to the context stack being pushed before rendering, and then not popped).
This behavior differs from a standard Template.render call and it seemed like a straight forward enough inconsistency so I committed [1] which changed render_to_string to leave the context how it found it. Being an idiot, I did my full test-suite pass against the wrong branch and therefore failed to heed some warning bells of the impact of this :( I've since fixed the test-suite failures [2] (there's still one outstanding issue [3] although that has an easy enough solution). Anyway, the change in [1] is backwards incompatible, due to the fact that people may be relying on the render_to_string (or render_to_response which uses this method) method leaving the context stack 'unresolved'. Option A is that the change is reverted and the inconsistency between Template.render and the render_to_* methods is documented. Option B is that the change remains and the backwards incompatibility is documented in the 1.3 changelog. (PS: the fixes in [2] are a good addition independent to the outcome of the decision of backwards incompatible change - and actually necessary to avoid the impact of the original problem) [1] http://code.djangoproject.com/changeset/15591 [2] http://code.djangoproject.com/changeset/15618 [3] http://code.djangoproject.com/ticket/15368 -- You received this message because you are subscribed to the Google Groups "Django developers" 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/django-developers?hl=en.
