I have the following self referencing model that gives who this profile supports.
supports = models.ManyToManyField('self', blank=True, symmetrical=False,
related_name='supporters')
And I want the count not supports, supporters that support this user.
Any ideas ?
def get_queryset(self):
qs = super(ProfileListView, self).get_queryset()
if self.request.GET.get('s'):
sorting = self.request.GET.get('s')
if sorting == 'pop':
qs = ......
return qs