On 1/28/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> An implementation question, though: If foo.objects is a Manager
> instance, and accessing foo.objects returns a QuerySet instance, how
> would one access the other manager methods, such as
> foo.objects.get_pub_date_list(), etc.?

Isn't get_pub_date_list() really just a specialist type of values() call?

foo.objects -> set of all objects
foo.objects.values() -> dictionary containing values from set of all objects
foo.objects.pub_date_values() -> list containing all available dates

and more generally,

foo.objects.ATTR_values() -> set containing all available ATTRs

To maintain the full feature list of get_pub_date_list(), allow:

foo.objects.pub_date_values('year') -> set of all available years

as a special case for datetime fields.

Russ Magee %-)

Reply via email to