1
0
mirror of https://github.com/django/django.git synced 2024-12-22 09:05:43 +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

@ -87,6 +87,7 @@ answer newbie questions, and generally made Django that much better:
Luke Plant <http://lukeplant.me.uk/>
plisk
Daniel Poelzleithner <http://poelzi.org/>
J. Rademaker
Brian Ray <http://brianray.chipy.org/>
Oliver Rutherfurd <http://rutherfurd.net/>
David Schein

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 ''