From c460f713cad80caa86eea80dded2b7783db60456 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Sun, 14 Aug 2016 13:19:26 +0200 Subject: [PATCH] Stats on bookmarks without http status 200 OK --- digimarks.py | 6 ++++-- templates/tags.html | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/digimarks.py b/digimarks.py index bdbda26..4d4a9b8 100644 --- a/digimarks.py +++ b/digimarks.py @@ -438,10 +438,12 @@ def tags(userkey): totaltags = len(alltags) totalbookmarks = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.status == Bookmark.VISIBLE).count() totalpublic = PublicTag.select().where(PublicTag.userkey == userkey).count() - totaldeleted = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.status == Bookmark.DELETED).count() totalstarred = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.starred == True).count() + totaldeleted = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.status == Bookmark.DELETED).count() + totalhttperrorstatus = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.http_status != 200).count() return render_template('tags.html', tags=alltags, totaltags=totaltags, totalpublic=totalpublic, totalbookmarks=totalbookmarks, - totaldeleted=totaldeleted, totalstarred=totalstarred, userkey=userkey) + totaldeleted=totaldeleted, totalstarred=totalstarred, totalhttperrorstatus=totalhttperrorstatus, + userkey=userkey) @app.route('//tag/') diff --git a/templates/tags.html b/templates/tags.html index b9ccbad..7f7343a 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -12,6 +12,7 @@ present_to_all turned_in star + warning delete @@ -21,6 +22,7 @@ {{ totalpublic }} {{ totalbookmarks }} {{ totalstarred }} + {{ totalhttperrorstatus }} {{ totaldeleted }}