Opened 6 years ago

Closed 4 years ago

#15651 closed New feature (duplicate)

Add option to forms.FilePathField to sort choices

Reported by: FunkyBob Owned by: nobody
Component: Forms Version: master
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 6 years ago.

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by FunkyBob

Attachment: filepath_sort.diff added

comment:1 Changed 6 years ago by anonymous

Component: UncategorizedForms
Has patch: set
milestone: 1.3
Needs documentation: set
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 6 years ago by Ramiro Morales

milestone: 1.3
Needs tests: set

comment:3 Changed 5 years ago by Luke Plant

Type: New feature

comment:4 Changed 5 years ago by Luke Plant

Severity: Normal

comment:5 Changed 5 years ago by Julien Phalip

Triage Stage: UnreviewedAccepted

comment:6 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 Changed 4 years ago by Claude Paroz

Resolution: duplicate
Status: newclosed

Adressed in ticket #8217.

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