Ticket #8217: FilePathField-sorted_py2.3.diff
File FilePathField-sorted_py2.3.diff, 746 bytes (added by , 16 years ago) |
---|
-
django/forms/fields.py
841 841 842 842 if recursive: 843 843 for root, dirs, files in os.walk(self.path): 844 files.sort(lambda x, y: cmp(x.lower(), y.lower())) 844 845 for f in files: 845 846 if self.match is None or self.match_re.search(f): 846 847 f = os.path.join(root, f) … … 854 855 except OSError: 855 856 pass 856 857 858 self.choices.sort(lambda x, y: cmp(x[1].lower(), y[1].lower())) 857 859 self.widget.choices = self.choices 858 860 859 861 class SplitDateTimeField(MultiValueField):