--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d4894e89-18fe-49cd-a40f-718a16c9ac60n%40googlegroups.com.
Define a method on your queryset that sets up the filter
class RecognitionQuerySet: def allowed(self, user): return self.filter(team=user.team)
Class RecognitionManager: def get_queryset(self): return RecognitionQuerySet(self.model, using=self._db)
Class Recognition: objects = RecognitionManager()
recognitions = Recognition.objects.all().allowed(user)
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20211130080240.78a58df5%40bigbox.attlocal.net.