mirror of
https://github.com/pinry/pinry.git
synced 2025-11-14 09:05:41 +01:00
image can be loaded with a join as well (saves another query)
This commit is contained in:
@@ -139,7 +139,7 @@ class PinResource(ModelResource):
|
||||
filtering = {
|
||||
'submitter': ALL_WITH_RELATIONS
|
||||
}
|
||||
queryset = Pin.objects.all().select_related('submitter'). \
|
||||
queryset = Pin.objects.all().select_related('submitter', 'image'). \
|
||||
prefetch_related('image__thumbnail_set', 'tags')
|
||||
resource_name = 'pin'
|
||||
include_resource_uri = False
|
||||
|
||||
Reference in New Issue
Block a user