projects
/
femtoblackweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fd63e6
)
Tri de la home page par date d’upload des fichiers
author
Olivier Tétard
<olivier.tetard@miskin.fr>
Mon, 16 Nov 2015 21:48:45 +0000
(22:48 +0100)
committer
Olivier Tétard
<olivier.tetard@miskin.fr>
Mon, 16 Nov 2015 21:48:45 +0000
(22:48 +0100)
femtoblackweb.py
patch
|
blob
|
history
diff --git
a/femtoblackweb.py
b/femtoblackweb.py
index
10d7afa
..
1138e71
100644
(file)
--- 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))