trier liste historique par date

This commit is contained in:
2023-11-30 18:38:09 +01:00
parent 46785d0231
commit 8872673b6c
3 changed files with 11 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
</head>

View File

@@ -1,3 +1,4 @@
2023-11-29 17:22:16 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. *** 2023-11-29 17:22:16 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
2023-11-29 17:23:56 [ Screenshot 2023-11-20 at 12.07.54.png ] Le format du fichier n'est pas valide. Téléchargement refusé. 2023-11-29 17:23:56 [ Screenshot 2023-11-20 at 12.07.54.png ] Le format du fichier n'est pas valide. Téléchargement refusé.
30-11-2023 17:29 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. *** 30-11-2023 17:29 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
30-11-2023 18:32 [ www.icloud.com.html ] *** Cleanup réussi. ***

View File

@@ -191,8 +191,11 @@ def view_log(request):
except Exception as e: except Exception as e:
pass pass
# lire tous les fichiers du dossier # lire tous les fichiers du dossier triés par date
for f in os.scandir(temp_folder): entries = sorted(os.scandir(temp_folder), key=lambda ent: ent.stat().st_mtime)
# parcorrir tous les fichiers du dossier
for f in entries:
if f.name[0] != '.' and f.name != 'errors_log': if f.name[0] != '.' and f.name != 'errors_log':
f_path = temp_folder + f.name f_path = temp_folder + f.name
nbs = os.path.getmtime(f_path) # en nombre de secondes nbs = os.path.getmtime(f_path) # en nombre de secondes