Luke Plant wrote:
> In the new descriptor syntax, are we going to allow Q() objects as
> positional arguments to the filter() method (and others)?  They seem
> like they could be a useful way of creating queries, although there is
> some duplication now that you can combine QuerySets directly.  However,
> passing QuerySets around might be a pain in some use cases.  You might,
> for instance, have created an algorithm which is used across a number
> of models that happen to have fields with the same names.  In this case
> you might want to be able to handle Q objects in the abstract, without
> having to pass QuerySets around.
> 
> I mention this because I see you've changed core_filters back to a
> dictionary of lookup arguments, Adrian, (which made perfect sense as it
> was, since filter() only took keyword arguments) but I was thinking
> yesterday that there is no reason why we couldn't have the positional
> arguments back as before.
> 
> Regards,
> 
> Luke
> 
> 
Couldn't you just pass a model class or manager into your function that
generates the appropriate queryset from that? Seems like an esoteric
need anyway.

Reply via email to