Sfoglia il codice sorgente

image can be loaded with a join as well (saves another query)

pull/86/head
Jens Gutermuth 9 anni fa
parent
commit
9d4791b65a
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      pinry/core/api.py

+ 1
- 1
pinry/core/api.py Vedi File

@@ -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


Caricamento…
Annulla
Salva