From b4d4af0b226d110a6909d8e42b6be9149b140407 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20T=C3=A9tard?= Date: Mon, 16 Nov 2015 22:48:45 +0100 Subject: [PATCH] =?utf8?q?Tri=20de=20la=20home=20page=20par=20date=20d?= =?utf8?q?=E2=80=99upload=20des=20fichiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- femtoblackweb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/femtoblackweb.py b/femtoblackweb.py index 10d7afa..1138e71 100644 --- a/femtoblackweb.py +++ b/femtoblackweb.py @@ -50,7 +50,7 @@ def index(): """ files = [] - for p in pathlib.Path(app.config['UPLOAD_FOLDER']).iterdir(): + for p in sorted(pathlib.Path(app.config['UPLOAD_FOLDER']).iterdir(), key=lambda x: x.stat().st_ctime, reverse=True): (filename, ext) = os.path.splitext(p.name) json_file = os.path.join(app.config['UPLOAD_FOLDER'], "{}.json".format(p.name)) -- 2.30.2