From: Radek Czajka Date: Mon, 11 Mar 2013 15:11:09 +0000 (+0100) Subject: Sort files in fileupload. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/b658810bd0ea529e2412fdc33e5848278863d1b7 Sort files in fileupload. --- diff --git a/apps/fileupload/views.py b/apps/fileupload/views.py index 8863465c..d08bfd32 100644 --- a/apps/fileupload/views.py +++ b/apps/fileupload/views.py @@ -99,7 +99,7 @@ class UploadView(FormView): files = [] path = self.get_safe_path() if os.path.isdir(path): - for f in os.listdir(path): + for f in sorted(os.listdir(path)): file_info = { "name": f, }