Opened 15 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)
Change History (9)
by , 15 years ago
| Attachment: | filepath_sort.diff added |
|---|
comment:1 by , 15 years ago
| Component: | Uncategorized → Forms |
|---|---|
| Has patch: | set |
| milestone: | → 1.3 |
| Needs documentation: | set |
comment:2 by , 15 years ago
| milestone: | 1.3 |
|---|---|
| Needs tests: | set |
comment:3 by , 15 years ago
| Type: | → New feature |
|---|
comment:4 by , 15 years ago
| Severity: | → Normal |
|---|
comment:5 by , 15 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:6 by , 14 years ago
| UI/UX: | unset |
|---|
Note:
See TracTickets
for help on using tickets.
Change UI/UX from NULL to False.