1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #1348 -- {% ifchanged %} tag no longer renders content twice. Thanks, j.rademaker

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2006-02-17 18:18:03 +00:00
parent 97eb38b21d
commit e9c3efe7f3
2 changed files with 1 additions and 5 deletions

View File

@@ -121,12 +121,7 @@ class IfChangedNode(Node):
def render(self, context):
content = self.nodelist.render(context)
if content != self._last_seen:
firstloop = (self._last_seen == None)
self._last_seen = content
context.push()
context['ifchanged'] = {'firstloop': firstloop}
content = self.nodelist.render(context)
context.pop()
return content
else:
return ''