Skip to content
Myr

[svn] groupby sorts on it's own now

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 56e20cf · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:jinja/filters.py+3 added-1 removed
875 unmodified lines
876 *New in Jinja 1.2*877 """878 def wrapped(env, context, value):879 expr = lambda x: env.get_attribute(x, attribute)880 return [{880 rv = [{881 'grouper': a,882 'list': list(b)883 } for a, b in groupby(sorted(value, key=expr), expr)]884 rv.sort()885 return rv886 return wrapped887888889FILTERS = {
48 unmodified lines