summaryrefslogtreecommitdiffstats
path: root/activities/views
diff options
context:
space:
mode:
Diffstat (limited to 'activities/views')
-rw-r--r--activities/views/follows.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/activities/views/follows.py b/activities/views/follows.py
index f5f5909..5e14740 100644
--- a/activities/views/follows.py
+++ b/activities/views/follows.py
@@ -53,4 +53,12 @@ class Follows(ListView):
target=self.request.identity, source_id__in=identity_ids
).values_list("source_id", flat=True)
context["inbound"] = self.inbound
+ context["num_inbound"] = Follow.objects.filter(
+ target=self.request.identity,
+ state__in=FollowStates.group_active(),
+ ).count()
+ context["num_outbound"] = Follow.objects.filter(
+ source=self.request.identity,
+ state__in=FollowStates.group_active(),
+ ).count()
return context