From 96b833cbc8f7b792ae6c5ff2714f0cd168b63beb Mon Sep 17 00:00:00 2001 From: Choom Date: Sat, 17 Dec 2022 06:04:21 -0300 Subject: Basural en frame y home --- cgi/post.py | 4 +++- cgi/templates/home.html | 3 ++- cgi/templates/trash.html | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cgi/post.py b/cgi/post.py index 826816a..e3ab27f 100644 --- a/cgi/post.py +++ b/cgi/post.py @@ -1117,10 +1117,12 @@ def regenerateNews(): def regenerateTrash(): posts = FetchAll("SELECT posts.id AS id, timestamp_formatted, posts.message AS message, boards.name AS board FROM `posts` INNER JOIN `boards` ON boardid = boards.id WHERE IS_DELETED = 2 ORDER BY `timestamp` DESC") + for i in range(len(posts)): + posts[i]["timestamp_formatted"] = posts[i]["timestamp_formatted"].split()[0] posts[i]["message"] = formatting.remove_html(posts[i]["message"]) - template_values = {'posts': posts} + template_values = {'posts': posts} page_rendered = renderTemplate('trash.html', template_values) with open(Settings.HOME_DIR + "basural.html", "w") as f: diff --git a/cgi/templates/home.html b/cgi/templates/home.html index 1875fd2..7784c7c 100644 --- a/cgi/templates/home.html +++ b/cgi/templates/home.html @@ -64,7 +64,8 @@ BaI Móvil · Estadísticas · Archivo · - API + API · + Basural diff --git a/cgi/templates/trash.html b/cgi/templates/trash.html index 1bffc08..0bd5d8e 100644 --- a/cgi/templates/trash.html +++ b/cgi/templates/trash.html @@ -70,7 +70,7 @@ td:nth-child(even) {
-<&<<<<lt; Volver +<&<<<<lt; Volver