Django Book 翻译
菜单>:
TOC
返回
原文:
Since were searching against a many-to-many field, its possible for the same book to be returned more than once by the query (e.g., a book with two authors who both match the search query). Adding ``.distinct()`` to the filter lookup eliminates any duplicate results.
翻译:
既然搜索依靠多对多域来实现,就有可能对同一本书返回多次查询结果(例如:一本书有两个作者都符合查询条件)。因此添加 ``.distinct()`` 过滤查询结果,消除重复部分。
备注:
译者: