diff --git a/digimarks.py b/digimarks.py index 85a4322..83bed0d 100644 --- a/digimarks.py +++ b/digimarks.py @@ -425,8 +425,9 @@ def tags(userkey): total = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.tags.contains(tag), Bookmark.status == Bookmark.VISIBLE).count() alltags.append({'tag': tag, 'publictag': publictag, 'total': total}) - total = len(alltags) - return render_template('tags.html', tags=alltags, total=total, userkey=userkey) + totaltags = len(alltags) + totalbookmarks = Bookmark.select().where(Bookmark.userkey == userkey).count() + return render_template('tags.html', tags=alltags, totaltags=totaltags, totalbookmarks=totalbookmarks, userkey=userkey) @app.route('//tag/') diff --git a/templates/tags.html b/templates/tags.html index b28d32e..82d7035 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -5,6 +5,33 @@
+ + + + + + + + + + + + + + + + + +
 Total
+ Different tags + + {{ totaltags }} +
+ Total bookmarks + + {{ totalbookmarks }} +
+ @@ -14,16 +41,6 @@ - - - - {% for tag in tags %}
- All - - - - - {{ total }} -