Question

I have the following resource:

class MachineResource(ModelResource):
manager = fields.ToOneField(UserResource, 'manager',full=True)
class Meta:
    queryset = Service.objects.filter(service_type='machine')
    resource_name = 'machine'

This works fine. And will return a list of machines, and an embedded user object (the manager) in each.

However, I only one want 2-3 fields from the manager user. I dont want it to contain the managers salted pass and other private data for example.

As far as I can see there isn't a way I can do this easily?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top