From 07881317aa6c6fa2fc11baeaa723398aff3c99cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20G=C3=B6tz?= Date: Fri, 25 Jan 2019 02:21:12 +0100 Subject: [PATCH] Implement initial date ordering desc --- main.py | 6 ++++-- templates/index.html | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index b153d09..20c5926 100644 --- a/main.py +++ b/main.py @@ -4,13 +4,15 @@ from flask import Flask, render_template, request app = Flask(__name__) app.debug = True -sql_statement = 'SELECT "id","title","alias","shortid","viewcount","lastchangeAt" FROM "Notes";' +sql_statement = 'SELECT "id","title","alias","shortid","viewcount","lastchangeAt" FROM "Notes" ORDER BY "lastchangeAt" DESC;' HOST = '192.168.0.3' DB = 'hackmd' USER = 'hackmd' PASSWORD = 'osHx34e4aDazGsER' CODI_URL = "https://hackmd.wiai.de" -#lastchangeAt, alias, viewcount + + +# lastchangeAt, alias, viewcount @app.route("/") def main(): diff --git a/templates/index.html b/templates/index.html index 7a928ea..7cbca99 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,7 +13,7 @@
-
+
@@ -22,9 +22,9 @@
{% for note in notes %} {% if note[1] and note[2] %} -