[Django] #33202: Add a "grouper" template filter

6 views
Skip to first unread message

Django

unread,
Oct 16, 2021, 6:57:35 AM10/16/21
to django-...@googlegroups.com
#33202: Add a "grouper" template filter
-------------------------------------------+------------------------
Reporter: horpto | Owner: nobody
Type: New feature | Status: new
Component: Template system | Version:
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------------+------------------------
A simple filter tag that will get an iterableof elements and optional
number n. It will regroup an iterable to iterable of lists with length not
more than n elements. By default n is 2.
This filter can be used to render lists to rows.

`[3,4,5,6,7,8,9]| grouper -> [[3, 4], [5, 6], [7, 8], [9]]`

--
Ticket URL: <https://code.djangoproject.com/ticket/33202>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 16, 2021, 8:10:12 AM10/16/21
to django-...@googlegroups.com
#33202: Add a "grouper" template filter
---------------------------------+--------------------------------------
Reporter: horpto | Owner: nobody
Type: New feature | Status: closed
Component: Template system | Version: dev
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* version: => dev
* resolution: => wontfix


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. You can start a discussion on DevelopersMailingList if you don't
agree.

--
Ticket URL: <https://code.djangoproject.com/ticket/33202#comment:1>

Reply all
Reply to author
Forward
0 new messages