[Answer]-Filter based fields exclusion in tastypie

1👍

class UserResource(ModelResource):
   class Meta:
      queryset = CUser.objects.all()
      resource_name = 'c_user'

   def dehydrate(self, bundle):
      if not bundle.obj.show_contact_info:
          bundle.data.pop(phone)

       return bundle

Leave a comment