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
Source:stackexchange.com