django-nonrel/mongodb-engine — Issue #97: Support for $slice-ing ListFields
Author: jonashaag
Created: 2011-12-26 19:48:04+00:00
State: open

It should be possible to pass a second parameter to `raw_query(...)` specifying a list of fields to include (similar to Django's `values(...)`).

I see two possibilities for implementing this:

* Restricting the arguments passed that way to `$slice` and similar; not allowing boolean include/exclude flags -- these could be passed using `values(...)`
* Allowing anything PyMongo accepts as `fields`. Needs some extra work to make Django return a `ValuesQuerySet`

In both cases we'd need to merge the fields passed to `raw_query` and `values` (if called).