瀏覽代碼

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

pull/86/head
Jens Gutermuth 9 年之前
父節點
當前提交
9d4791b65a
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      pinry/core/api.py

+ 1
- 1
pinry/core/api.py 查看文件

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


Loading…
取消
儲存