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:
parent
97eb38b21d
commit
e9c3efe7f3
1
AUTHORS
1
AUTHORS
|
@ -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
|
||||
|
|
|
@ -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 ''
|
||||
|
|
Loading…
Reference in New Issue