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.
django.core.paginator.PaginatorMongoDBカーソルオブジェクトを拡張してDjangoのクラスと互換性を持たせる既知の方法はありますか?
django.core.paginator.Paginator
または、多分、Djangoのクラスを拡張しますか?
あなたの一時的な解決策 (https://gist.github.com/2351079) は良さそうですが、 ですべての結果を強制的にフェッチしlist()、 でページ分割する代わりに、カーソルでandを明示的に[bottom:top]使用してみてください。おそらくパフォーマンスが向上します。 .skip().limit()
list()
[bottom:top]
.skip()
.limit()