Opened 2 years ago

Closed 2 years ago

#29181 closed New feature (needsinfo)

Move admin's flatten() function to django.utils

Reported by: Daniel Hahler Owned by: nobody
Component: Utilities Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Change History (2)

comment:1 Changed 2 years ago by Tim Graham

Component: UncategorizedUtilities
Summary: Move `flatten` to utilsMove admin's flatten() function to django.utils
Type: UncategorizedNew feature

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

Last edited 2 years ago by Tim Graham (previous) (diff)

comment:2 Changed 2 years ago by Tim Graham

Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top