From 359ac2f4ab4cb52af0f718a6f5cb89125d3562eb Mon Sep 17 00:00:00 2001 From: manetta Date: Fri, 12 Mar 2021 22:14:34 +0100 Subject: [PATCH] the sorting order of the posts is fixed now, bit hacky in the jinja template --- LogBot/template.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/LogBot/template.html b/LogBot/template.html index 62e0811..7be7bf3 100644 --- a/LogBot/template.html +++ b/LogBot/template.html @@ -9,13 +9,17 @@

{{ title }}

- {% for num, msg in db.items() %} + {% set sorted = [] %} + {% for num in db %} + {% set int_num = num | int %} +
{{ sorted.append(int_num) }}
+ {% endfor %} + {% for num in sorted | sort %}
-

[{{ num }}]

-

{{ msg }}

+

[{{ num | string }}]

+

{{ db[num|string] }}

- {% endfor %}