=== modified file 'django/template/defaulttags.py'
|
|
|
237 | 237 | return '' |
238 | 238 | output = [] # list of dictionaries in the format {'grouper': 'key', 'list': [list of contents]} |
239 | 239 | for obj in obj_list: |
240 | | grouper = self.expression.resolve(Context({'var': obj}), True) |
| 240 | grouper = self.expression.resolve(obj, True) |
241 | 241 | if output and output[-1]['grouper'] == grouper: |
242 | 242 | output[-1]['list'].append(obj) |
243 | 243 | else: |
… |
… |
|
846 | 846 | if lastbits_reversed[1][::-1] != 'as': |
847 | 847 | raise TemplateSyntaxError, "next-to-last argument to 'regroup' tag must be 'as'" |
848 | 848 | |
849 | | expression = parser.compile_filter('var.%s' % lastbits_reversed[2][::-1]) |
| 849 | expression = parser.compile_filter(lastbits_reversed[2][::-1]) |
850 | 850 | |
851 | 851 | var_name = lastbits_reversed[0][::-1] |
852 | 852 | return RegroupNode(target, expression, var_name) |