How to filter ToManyField of django-tastypie by request.user?
I'm building an API with tastypie for a django app for data based on the user. The resources are like this: class PizzaResource(ModelResource): toppings = fields.ToManyField( 'project.app.api.ToppingResource', 'topping_set' ) class Meta: authentication = SessionAuthentication() queryset = Pizza.objects.all() def apply_authorization_limits(self, request, object_list): return object_list.filter(users=request.user) class ToppingResource(ModelResource): pizza = fields.ForeignKey(PizzaResource, 'pizza') class Meta: authentication = SessionAuthentication() queryset = Topping.objects.filter() The