Ticket #2454: for-reset-ifchanged.2.diff
File for-reset-ifchanged.2.diff, 559 bytes (added by , 18 years ago) |
---|
-
django/template/defaulttags.py
125 125 self._last_seen = None 126 126 127 127 def render(self, context): 128 if context.has_key('forloop') : 129 if context['forloop']['first']: 130 self._last_seen = None 128 131 content = self.nodelist.render(context) 129 132 if content != self._last_seen: 130 133 firstloop = (self._last_seen == None)