Django

Code

Ticket #3629 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: James Turnbull <james@lewis.co.uk> Assigned to: adrian
Milestone: Component: django.contrib.admin
Version: SVN Keywords: FilePathField, recursive, path
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

filepathfield.patch (0.6 kB) - added by James Turnbull <james@lewis.co.uk> on 03/02/07 04:14:00.
First Patch File

Change History

03/02/07 04:14:00 changed by James Turnbull <james@lewis.co.uk>

  • attachment filepathfield.patch added.

First Patch File

03/25/07 15:59:02 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

Thanks James

04/01/07 00:42:48 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #3629 (FilePathField with recursive=True should show path to files in Admin)




Change Properties
Action