Changes between Initial Version and Version 1 of Ticket #28264
- Timestamp:
- Jun 1, 2017, 12:07:19 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28264
- Property Needs tests set
- Property Triage Stage Unreviewed → Accepted
- Property Summary django.forms.FilePathField does not return sorted subdirectories in formfield → forms.FilePathField does not return sorted subdirectories in formfield
- Property Type Uncategorized → Cleanup/optimization
-
Ticket #28264 – Description
initial v1 1 1 In the code : 2 3 4 2 {{{ 3 for root, dirs, files in sorted(os.walk(self.path)): 4 if self.allow_files: 5 5 # here, files are not sorted 6 7 8 9 10 6 for f in files: 7 if self.match is None or self.match_re.search(f): 8 f = os.path.join(root, f) 9 self.choices.append((f, f.replace(path, "", 1))) 10 if self.allow_folders: 11 11 # and here, dirs are not sorted 12 for f in dirs: 13 if f == '__pycache__': 12 for f in dirs: 13 if f == '__pycache__': 14 }}}