[Django] #29181: Move `flatten` to utils

4 views
Skip to first unread message

Django

unread,
Mar 2, 2018, 4:23:39 PM3/2/18
to django-...@googlegroups.com
#29181: Move `flatten` to utils
-----------------------------------------+------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I think `flatten` from `django.contrib.admin.utils` should be moved to
`django.utils`, and get modernized to not only handle nested lists and
tuples.

I've tried to use it with django/forms/widgets.py, but it caused an
recursive import issue.

Where should it go? django/utils/functional.py

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

Django

unread,
Mar 3, 2018, 1:18:11 PM3/3/18
to django-...@googlegroups.com
#29181: Move admin's flatten() function to django.utils
-------------------------------+--------------------------------------

Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: master
Severity: Normal | Resolution:

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

* component: Uncategorized => Utilities
* type: Uncategorized => New feature


Comment:

It might be a candidate or `django.utuils.intercompat` (although the
"itercompat" name is no longer really relevant). How will the function be
used in widgest?

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

Django

unread,
Mar 14, 2018, 10:36:20 AM3/14/18
to django-...@googlegroups.com
#29181: Move admin's flatten() function to django.utils
-------------------------------+--------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: closed
Component: Utilities | Version: master
Severity: Normal | Resolution: needsinfo

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

* status: new => closed
* resolution: => needsinfo


--
Ticket URL: <https://code.djangoproject.com/ticket/29181#comment:2>

Reply all
Reply to author
Forward
0 new messages