Skip to content

Added unique filter#469

Closed
snoack wants to merge 1 commit intopallets:masterfrom
snoack:unique-filter
Closed

Added unique filter#469
snoack wants to merge 1 commit intopallets:masterfrom
snoack:unique-filter

Conversation

@snoack
Copy link
Copy Markdown
Contributor

@snoack snoack commented Aug 4, 2015

4 years ago I suggested to add a unique filter, along with some other new filters as part of #66. That pull request has been closed, after some parts of it got implemented independently. However, I just saw a similar request (#443) for excluding duplicates using filters. So I rebased my old patch, added tests and did some logical improvements, that it hopefully get merged now.

Comment thread jinja2/filters.py


def make_attrgetter(environment, attribute):
def make_attrgetter(environment, attribute, lowercase=False):

This comment was marked as off-topic.

This comment was marked as off-topic.

Comment thread jinja2/filters.py


def make_attrgetter(environment, attribute):
def make_attrgetter(environment, attribute, lowercase=False):

This comment was marked as off-topic.

Comment thread jinja2/filters.py
key = getter(item)
if key not in seen:
seen.add(key)
rv.append(item)

This comment was marked as off-topic.

@davidism
Copy link
Copy Markdown
Member

Needs a changelog entry.

@Talkless
Copy link
Copy Markdown

@snoack Are you yet interested in fixing this PR?

@davidism davidism mentioned this pull request Jul 5, 2017
@davidism
Copy link
Copy Markdown
Member

davidism commented Jul 5, 2017

Continued in #735

@davidism davidism closed this Jul 5, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants