* ui_ux: => 0
* easy: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/6904#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* type: Bug => New feature
* stage: Design decision needed => Accepted
Comment:
I don't think case-sensitive ordering is so obviously wrong in all cases
that we can just change the behavior backwards-incompatibly and force
anyone who wants the current behavior to implement their own filter.
Accepting this on the basis that it would be reasonable to add something
like "idictsort", since case-insensitive would frequently be preferable
for strings. It would also be worth looking in more detail at whether
there are any downsides to using locale collation for this new tag rather
than simple .lower(), as Michael Jung suggests.
--
Ticket URL: <https://code.djangoproject.com/ticket/6904#comment:12>
* cc: bmispelon@… (added)
Comment:
For what it's worth, it's already possible to do `dictsort:'foo.lower'` so
I'm -1 on introducing a new tag.
--
Ticket URL: <https://code.djangoproject.com/ticket/6904#comment:13>
* status: new => closed
* resolution: => wontfix
Comment:
Agreed with bmispelon. If there's a case where `foo.lower` won't work,
please re-open.
--
Ticket URL: <https://code.djangoproject.com/ticket/6904#comment:14>
* status: closed => new
* resolution: wontfix =>
Comment:
Reopening, because as of 4.0.1 {{{dictsort:'foo.lower'}}} is not possible
anymore, due to CVE-2021-45116
--
Ticket URL: <https://code.djangoproject.com/ticket/6904#comment:15>
* status: new => closed
* needs_better_patch: 1 => 0
* has_patch: 1 => 0
* resolution: => wontfix
* needs_docs: 1 => 0
Comment:
The current thread is to keep Django a core framework, not providing every
utility which might be useful. You can write that filter in your own
library, e.g.
{{{#!python
@register.filter(is_safe=False)
def dictsortlower(value):
return sorted(value, key=str.lower)
}}}
You can start a discussion on DevelopersMailingList if you don't agree.
--
Ticket URL: <https://code.djangoproject.com/ticket/6904#comment:16>