Add follower count to /holes table.

remotes/1693045480750635534/spooky-22
Snakes 2022-06-10 06:06:34 -04:00
parent ef2da2498b
commit b0554ce303
2 changed files with 9 additions and 3 deletions

View File

@ -47,4 +47,9 @@ class Sub(Base):
@property
@lazy
def block_num(self):
return len(self.blocks)
return len(self.blocks)
@property
@lazy
def follow_num(self):
return len(self.followers)

View File

@ -15,8 +15,8 @@
<th>#</th>
<th>Name</th>
<th role="button" onclick="sort_table(2)">Posts</th>
<th role="button" onclick="sort_table(3)">Blockers</th>
<th role="button" onclick="sort_table(3)">Followers</th>
<th role="button" onclick="sort_table(4)">Blockers</th>
</tr>
</thead>
{% for sub, count in subs %}
@ -24,6 +24,7 @@
<td>{{loop.index}}</td>
<td><a href="/h/{{sub.name}}">{{sub.name}}</a></td>
<td><a href="/h/{{sub.name}}">{{count}}</a></td>
<td><a href="/h/{{sub.name}}/followers">{{sub.follow_num}}</a></td>
<td><a href="/h/{{sub.name}}/blockers">{{sub.block_num}}</a></td>
</tr>
{% endfor %}