From e9c3efe7f389884c343f56ddd2cd17cba039333b Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 17 Feb 2006 18:18:03 +0000 Subject: [PATCH] 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 --- AUTHORS | 1 + django/core/template/defaulttags.py | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index b896f22e6b..61558a3900 100644 --- a/AUTHORS +++ b/AUTHORS @@ -87,6 +87,7 @@ answer newbie questions, and generally made Django that much better: Luke Plant plisk Daniel Poelzleithner + J. Rademaker Brian Ray Oliver Rutherfurd David Schein diff --git a/django/core/template/defaulttags.py b/django/core/template/defaulttags.py index 8d3865660a..1438b9f74a 100644 --- a/django/core/template/defaulttags.py +++ b/django/core/template/defaulttags.py @@ -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 ''