Opened 5 years ago

Closed 3 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


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 5 years ago.

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by FunkyBob

comment:1 Changed 5 years ago by anonymous

  • Component changed from Uncategorized to Forms
  • Has patch set
  • milestone set to 1.3
  • Needs documentation set
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 years ago by ramiro

  • milestone 1.3 deleted
  • Needs tests set

comment:3 Changed 5 years ago by lukeplant

  • Type set to New feature

comment:4 Changed 5 years ago by lukeplant

  • Severity set to Normal

comment:5 Changed 5 years ago by julien

  • Triage Stage changed from Unreviewed to Accepted

comment:6 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:7 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:8 Changed 3 years ago by claudep

  • Resolution set to duplicate
  • Status changed from new to closed

Adressed in ticket #8217.

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