Opened 8 years ago

Closed 6 years ago

Last modified 5 years ago

#8217 closed (fixed)

Alphabetical sorted FilePathField

Reported by: bernd Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When using the FilePathField-form-field I get an unordered list of files (I think the files are ordered by creation date).
If there are a lot of files it's very hard to get a good overview with this order.

My idea is to sort the files in alphabetical order which makes a long list much more easier to read.

I added a patch and run the test on "forms" without any errors.

Attachments (2)

FilePathField-sorted.diff (1.0 KB) - added by bernd 8 years ago.
FilePathField-sorted_py2.3.diff (746 bytes) - added by davidb 8 years ago.

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by bernd

Attachment: FilePathField-sorted.diff added

comment:1 Changed 8 years ago by Jacob

Triage Stage: UnreviewedAccepted

sorted() is new in 2.4, so the patch needs to use list.sort. Otherwise, good.

Changed 8 years ago by davidb

comment:2 Changed 8 years ago by davidb

I added a patch that does the sorting properly on Python 2.3. The "forms" tests passed without errors.

comment:3 Changed 6 years ago by Claude Paroz

Now that Python 2.3 support has been dropped, the first patch seems fine (it even still applies on current trunk). Ready to commit?

comment:4 Changed 6 years ago by paparent

Will this issue be fixed ?

comment:5 Changed 6 years ago by Claude Paroz

milestone: 1.3

comment:6 Changed 6 years ago by Jannis Leidel

Triage Stage: AcceptedReady for checkin

I could reproduce this on a Debian Lenny server.

comment:7 Changed 6 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [14772]) Fixed #8217 -- Correctly sort files in FilePathFields on older Python versions. Thanks, bernd and davidb.

comment:8 Changed 6 years ago by Jannis Leidel

(In [14774]) [1.2.X] Fixed #8217 -- Correctly sort files in FilePathFields on older Python versions. Thanks, bernd and davidb.

Backport from trunk (r14772).

comment:9 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top