浏览代码

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


正在加载...
取消
保存