干草堆飞快移动模型()不缩小模型 [英] Haystack whoosh models() not narrowing models

查看:86
本文介绍了干草堆飞快移动模型()不缩小模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下查询

locations = SearchQuerySet().filter_or(content__in=words).models(Location)

但是它也正在返回其他模型,我只想查看Location实例.

but it's returning other models as well, I would only want to see Location instances.

使用Haystack 2.1.0和Whoosh 2.5

Using Haystack 2.1.0 and whoosh 2.5

有什么想法吗?

推荐答案

我目前的解决方法是使用filter(django_ct='app_name.model')

My current work around is to use filter(django_ct='app_name.model')

这篇关于干草堆飞快移动模型()不缩小模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆