On 9/19/07, James <[EMAIL PROTECTED]> wrote:
>
> You matter-of-factly suggest that a ValuesQuerySet is as good as
> QuerySet.  However, the ValuesQuerySet has some fundamental
> limitations.  In particular, the ValuesQuerySet does not have
> attributes corresponding to the fields in the QuerySet.  This makes a
> ValuesQuerySet completely useless in a template -- quite unlike a
> regular QuerySet.

It was said matter-of-factly because it's true. How is ValuesQuerySet
useless in a template? It returns a list of dictionaries; the template
syntax can iterate over lists, and dictionary keys are one of the
lookup schemes. As long as you're not referencing an attribute that
isn't contained in the ValueQuerySet, moving from a QuerySet to a
ValuesQuerySet shouldn't even require a change in template.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to