diff --git a/app/db.py b/app/db.py index e4aba74..aea34c1 100644 --- a/app/db.py +++ b/app/db.py @@ -103,6 +103,10 @@ class User: def __init__(self, user): self.uri = user self.url = '/user/' + self.uri + self.subnodes = subnodes_by_user(user) + + def size(self): + return len(self.subnodes) def path_to_uri(path): return path.replace(config.AGORA_PATH + '/', '') diff --git a/app/templates/users.html b/app/templates/users.html index 64ef4d3..2108b85 100644 --- a/app/templates/users.html +++ b/app/templates/users.html @@ -19,7 +19,7 @@

Users

{% for user in users %} -{{user.uri}}
+{{user.uri}} ({{user.size()}})
{% endfor %}
{% endblock %}