Ticket #1461: regroup.patch
File regroup.patch, 782 bytes (added by , 19 years ago) |
---|
-
django/template/defaulttags.py
192 192 return '' 193 193 output = [] # list of dictionaries in the format {'grouper': 'key', 'list': [list of contents]} 194 194 for obj in obj_list: 195 grouper = self.expression.resolve(Context({'var': obj})) 195 grouper = self.expression.resolve(context) 196 grouper = resolve_variable('var.%s' % grouper, Context({'var': obj})) 196 197 # TODO: Is this a sensible way to determine equality? 197 198 if output and repr(output[-1]['grouper']) == repr(grouper): 198 199 output[-1]['list'].append(obj)