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:
@@ -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 ''
|
||||
|
||||
Reference in New Issue
Block a user