1
Have a look at build_bundle() and full_dehydrate(). I haven’t tested this but maybe something like this would work.
from my_app.models import WORKLOAD_CHOICES
class BlueprintResource(ModelResource):
def full_dehydrate(self, bundle, for_list=False):
dic = dict([WORKLOAD_CHOICES])
bundle.data['foo'] = self.build_bundle(data=dic)
return super(BlueprintResource, self).full_dehydrate(bundle, for_list)
Source:stackexchange.com