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.

-james

On Aug 30, 5:15 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 8/29/07, Diego pylorca <[EMAIL PROTECTED]> wrote:
>
> > ok, but this not return aquerySet, return a  dictionary :S
>
> Read the documentation more carefully. Specifically:
>
> > Returns a ValuesQuerySet - aQuerySetthat evaluates to a list
> > of dictionaries instead of model-instance objects.
>
> And:
>
> > Finally, note a ValuesQuerySet is a subclass ofQuerySet, so it has all
> > methods ofQuerySet. You can call filter() on it, or order_by(), or whatever.
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."


--~--~---------~--~----~------------~-------~--~----~
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