Opened 16 years ago

Closed 13 years ago

Last modified 12 years ago

#8217 closed (fixed)

Alphabetical sorted FilePathField

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

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 16 years ago.
FilePathField-sorted_py2.3.diff (746 bytes ) - added by davidb 15 years ago.

Download all attachments as: .zip

Change History (11)

by bernd, 16 years ago

Attachment: FilePathField-sorted.diff added

comment:1 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

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

by davidb, 15 years ago

comment:2 by davidb, 15 years ago

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

comment:3 by Claude Paroz, 14 years ago

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 by paparent, 14 years ago

Will this issue be fixed ?

comment:5 by Claude Paroz, 13 years ago

milestone: 1.3

comment:6 by Jannis Leidel, 13 years ago

Triage Stage: AcceptedReady for checkin

I could reproduce this on a Debian Lenny server.

comment:7 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

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

comment:8 by Jannis Leidel, 13 years ago

(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 by Jacob, 12 years ago

milestone: 1.3

Milestone 1.3 deleted

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