From 9eac05514457732ed7ac7211ed1705c8fa919ea5 Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Sat, 18 May 2024 22:14:31 +0200 Subject: [PATCH] feat: render_date on threads view --- threads.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/threads.py b/threads.py index d9ef13b..9ad51da 100755 --- a/threads.py +++ b/threads.py @@ -47,9 +47,7 @@ def middleware(): @threads.route('/') def home(): statuses = fetch_statuses() - currentDateTime = datetime.now() - date = currentDateTime.date() - return render_template('threads.html', threads=statuses, app=app, attribution=attribution, render_date=currentDateTime) + return render_template('threads.html', threads=statuses, app=app, attribution=attribution, render_date=datetime.now()) @threads.route('/') def thread(id): @@ -58,7 +56,7 @@ def thread(id): status['summary'] = clean_html(status['content']).strip() if len(status['summary']) > 69: status['summary'] = status['summary'][:69] + '...' - return render_template('threads.html', threads=[status], app=app, attribution=attribution) + return render_template('threads.html', threads=[status], app=app, attribution=attribution, render_date=datetime.now()) else: return '

Not Found

¯\_(ツ)_/¯

go home', 404