Deprecate from_ids in favor of optimizing filter(pk__in=[...])
frewsxcv opened this issue · 6 comments
frewsxcv commented
qs.from_ids([...])
is essentailly the same functionality as qs.filter(pk__in=[...])
. No reason to invent a new method
frewsxcv commented
Haven't though this entirely through yet, just throwing it out there for now
streeter commented
So are you thinking that you'd override filter
and then look for pk__in
or id__in
and deal with that case there?
frewsxcv commented
Yeah. What do you think about that?
frewsxcv commented
(this is mostly a note to myself) I would also probably look for pk__range
and id__range
too
streeter commented
I think that is a safe path to take. The reason is that the library already overrides get
, so the expectation is set. Plus, you have to activate the cache for a model with a flag on the model.