diff --git a/app/main/views.py b/app/main/views.py index 80449e07..c9d6dd64 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -31,7 +31,7 @@ def corpus(corpus_id): 'corpora', str(corpus.id)) files = {} - for file in os.listdir(dir): + for file in sorted(os.listdir(dir)): files[file] = {} files[file]['path'] = os.path.join(file) @@ -110,7 +110,7 @@ def job(job_id): 'jobs', str(job.id)) files = {} - for file in os.listdir(dir): + for file in sorted(os.listdir(dir)): if file == 'output': continue files[file] = {}