#5768: Allow QuerySet.values() to return values spanning joins.
-----------------------------------------------+----------------------------
Reporter:  anonymous <[EMAIL PROTECTED]>  |       Owner:  nobody       
  Status:  new                                 |   Component:  Uncategorized
 Version:  0.96                                |    Keywords:               
   Stage:  Unreviewed                          |   Has_patch:  0            
-----------------------------------------------+----------------------------
 I'd like to write:
 {{{
 class Tag(models.Model):
     name = models.CharField(maxlength=50)

 class Thing(models.Model):
     tags = models.ManyToManyKey(Tag)

 Thing.objects.filter(tags__name).values('tags.name').distinct()
 }}}

 My use case is slightly more complicated (I use django-tagging and the
 GenericRelation does not make things simpler).

 Of course I could do it manually with a loop, but it is necessary to have
 a queryset for some things, such as using a generic view.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5768>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to