Opened 14 years ago

Closed 13 years ago

#15651 closed New feature (duplicate)

Add option to forms.FilePathField to sort choices

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

Description

I (and my users) find it annoying that there's no sorting on FilePathField choices.

This patch allows a sort parameter to be passed. If set to True, it will sort lexically on the display value. If a callable is passed, it will be called with the field and choices as its arguments.

Attachments (1)

filepath_sort.diff (1.8 KB ) - added by FunkyBob 14 years ago.

Download all attachments as: .zip

Change History (9)

by FunkyBob, 14 years ago

Attachment: filepath_sort.diff added

comment:1 by anonymous, 14 years ago

Component: UncategorizedForms
Has patch: set
milestone: 1.3
Needs documentation: set

comment:2 by Ramiro Morales, 14 years ago

milestone: 1.3
Needs tests: set

comment:3 by Luke Plant, 14 years ago

Type: New feature

comment:4 by Luke Plant, 14 years ago

Severity: Normal

comment:5 by Julien Phalip, 14 years ago

Triage Stage: UnreviewedAccepted

comment:6 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 by Claude Paroz, 13 years ago

Resolution: duplicate
Status: newclosed

Adressed in ticket #8217.

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