From b0554ce303b0b6af76db9ca8e8f90a61e395696c Mon Sep 17 00:00:00 2001 From: TLSM Date: Fri, 10 Jun 2022 06:06:34 -0400 Subject: [PATCH] Add follower count to /holes table. --- files/classes/sub.py | 7 ++++++- files/templates/sub/subs.html | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/files/classes/sub.py b/files/classes/sub.py index 45c085c97..a35c53afa 100644 --- a/files/classes/sub.py +++ b/files/classes/sub.py @@ -47,4 +47,9 @@ class Sub(Base): @property @lazy def block_num(self): - return len(self.blocks) \ No newline at end of file + return len(self.blocks) + + @property + @lazy + def follow_num(self): + return len(self.followers) \ No newline at end of file diff --git a/files/templates/sub/subs.html b/files/templates/sub/subs.html index ea14b26bb..260b196d3 100644 --- a/files/templates/sub/subs.html +++ b/files/templates/sub/subs.html @@ -15,8 +15,8 @@ # Name Posts - Blockers - + Followers + Blockers {% for sub, count in subs %} @@ -24,6 +24,7 @@ {{loop.index}} {{sub.name}} {{count}} + {{sub.follow_num}} {{sub.block_num}} {% endfor %}