#28264: django.forms.FilePathField does not return sorted subdirectories in
formfield
-------------------------------------+-------------------------------------
               Reporter:  Jean-      |          Owner:  nobody
  Marie Thomas                       |
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Forms      |        Version:  1.11
               Severity:  Normal     |       Keywords:  FilePathField
           Triage Stage:             |      Has patch:  1
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 In the code :

             for root, dirs, files in sorted(os.walk(self.path)):
                 if self.allow_files:
 # here, files are not sorted
                     for f in files:
                         if self.match is None or self.match_re.search(f):
                             f = os.path.join(root, f)
                             self.choices.append((f, f.replace(path, "",
 1)))
                 if self.allow_folders:
 # and here, dirs are not sorted
                     for f in dirs:
                         if f == '__pycache__':

--
Ticket URL: <https://code.djangoproject.com/ticket/28264>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.ff633cc7d704c4bfd4d7ed84051f5445%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to