Opened 10 years ago

Closed 10 years ago

#3629 closed (fixed)

FilePathField with recursive=True should show path to files in Admin

Reported by: James Turnbull <james@…> Owned by: Adrian Holovaty
Component: contrib.admin Version: master
Severity: Keywords: FilePathField, recursive, path
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Consider a FilePathField, with recursive=True and path set to this directory:

/home/user/blah/

within that directory we have two folders and files:

/home/user/blah/apples/index.html
/home/user/blah/monkeys/index.html

However, the admin shows this as two files, both just called "index.html".

The attached patch strips off the common prefix and displays the drop-down contents as:

apples/index.html
monkeys/index.html

Attachments (1)

filepathfield.patch (630 bytes) - added by James Turnbull <james@…> 10 years ago.
First Patch File

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by James Turnbull <james@…>

Attachment: filepathfield.patch added

First Patch File

comment:1 Changed 10 years ago by Chris Beaven

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin

Thanks James

comment:2 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [4896]) Fixed #3629 -- In oldforms, differentiate files in a recursive FilePathField.
Thanks, James Turnbull.

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