diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-04-01 05:42:48 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-04-01 05:42:48 +0000 |
| commit | 96bf5e853c42770772dcc3fc1fba5fcf85733a11 (patch) | |
| tree | 5b0cda78ee91ba900ff88e40243b5b7e4f77c82d | |
| parent | 78b86d7eeb74273f559ccbddca067b16c5b80c96 (diff) | |
Fixed #3629 -- In oldforms, differentiate files in a recursive FilePathField.
Thanks, James Turnbull.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/oldforms/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/oldforms/__init__.py b/django/oldforms/__init__.py index 56101984f5..873bd0204a 100644 --- a/django/oldforms/__init__.py +++ b/django/oldforms/__init__.py @@ -923,7 +923,8 @@ class FilePathField(SelectField): for root, dirs, files in os.walk(path): for f in files: if match is None or match_re.search(f): - choices.append((os.path.join(root, f), f)) + f = os.path.join(root, f) + choices.append((f, f.replace(path, "", 1))) else: try: for f in os.listdir(path): |
