Skip to content

Loading…

groupby not supporting more than one dot #10

Closed
almet opened this Issue · 1 comment

2 participants

@almet

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
Owner

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

@miracle2k miracle2k pushed a commit to miracle2k/jinja2 that referenced this issue
@mitsuhiko groupby now supports attributes of attributes. This fixes #10 9573b66
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.