Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只想知道,就像我们可以多次在查询列表上应用过滤器一样。
我可以像这样在查询列表上应用原始 sql
models.Burn.active.filter(some filter).raw('custom sql')
不,你不能那样做。您只能raw调用manager对象。
raw
manager
由于filter返回一个 new QuerySet,您将无法调用raw它。
filter
QuerySet