diff --git a/pinry/core/api.py b/pinry/core/api.py index 56a4b21..334c019 100644 --- a/pinry/core/api.py +++ b/pinry/core/api.py @@ -135,7 +135,8 @@ class PinResource(ModelResource): filtering = { 'submitter': ALL_WITH_RELATIONS } - queryset = Pin.objects.all() + queryset = Pin.objects.all().select_related('submitter'). \ + prefetch_related('image', 'tags') resource_name = 'pin' include_resource_uri = False always_return_data = True