ifchanged no longer works within an included template
|Ready for checkin
|Patch needs improvement:
If you use ifchanged within an included template, whereas in 1.6 and previous this worked fine, in 1.7 ifchanged no longer appears to remember its stored state between iterations and so is always true.
I have uploaded a minimal test project to show this at https://github.com/dracos/broken-ifchanged with the Travis test results for 1.6 (pass) and 1.7 (fail) at https://travis-ci.org/dracos/broken-ifchanged/builds/35620470
I assume this is presumably related to the recursion changes mentioned in the Django 1.7 release notes, but if so it's not totally clear and so I thought I'd report this so at least the documentation could perhaps be changed to mention this issue and that you can't use ifchanged inside an include inside a loop.
I'm not sure what we can do now to get our code (full code Travis with 1.7 failure can be seen at https://travis-ci.org/mysociety/sayit/builds/35613315 ) working on 1.7 - we don't want to inline the inner template, it's quite large and used in multiple places.