groupby not supporting more than one dot #10

Closed
almet opened this Issue Dec 20, 2010 · 1 comment

Comments

2 participants
@almet

almet commented Dec 20, 2010

The groupby builtin filter currently do not support more that one dot.

For instance, if I have articles that I want to group by year, so I need to access item.date.year in the groupby filter, it is not possible by now, because jinja2 looks for the date.year attributes which do not exists.

This can probably be fixed by using operator.attrgetter in the filter.

@mitsuhiko

This comment has been minimized.

Show comment
Hide comment
@mitsuhiko

mitsuhiko Dec 20, 2010

Member

groupby now supports attributes of attributes. This closed by 9573b66

Member

mitsuhiko commented Dec 20, 2010

groupby now supports attributes of attributes. This closed by 9573b66

miracle2k pushed a commit to miracle2k/jinja2 that referenced this issue Jan 25, 2012

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment