Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow nested keys in regroup and dictsort #27

Merged
merged 3 commits into from Jul 18, 2012

Conversation

Projects
None yet
2 participants
Contributor

garazdawi commented May 18, 2012

I've added support to allow the following syntax

{% regroup builds|dictsort:"host.os" by host.os as os_list %}

If this is something which you would want upstream I can spend the time to polish and update tests.

Contributor

evanmiller commented Jul 17, 2012

Hi Lukas,

I am interested in merging this in. Can you update the test suite to cover the new syntax?

garazdawi added some commits May 18, 2012

Extend the regroup syntax to support nested keys
This commit allows the user to use nested regroup keys. ie.

    {% regroup builds by host.name as hostname_list %}
Contributor

garazdawi commented Jul 18, 2012

added some tests for regroup and dictsort, I'm unsure how to best test dictsort though as it is apparently not possible to use it in {% for %}, and you cannot have dicts in the test generators. Any ideas or is what I did good enough?

Contributor

evanmiller commented Jul 18, 2012

That'll do it, thanks!

evanmiller added a commit that referenced this pull request Jul 18, 2012

Merge pull request #27 from garazdawi/regroup_extend
Allow nested keys in regroup and dictsort

@evanmiller evanmiller merged commit 914781a into erlydtl:master Jul 18, 2012

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