Re: Making queries on manytomany tables

2009-05-22 Thread Alex Gaynor
On Fri, May 22, 2009 at 8:21 PM, Patrick wrote: > > Do I also need to use select_related() anywhere? > > On May 22, 5:57 pm, Alex Gaynor wrote: > > On Fri, May 22, 2009 at 7:41 PM, George Song wrote: > > > > > On 5/22/2009 5:31 PM, Patrick wrote: > > > > What is the best way to make queries on

Re: Making queries on manytomany tables

2009-05-22 Thread Patrick
Do I also need to use select_related() anywhere? On May 22, 5:57 pm, Alex Gaynor wrote: > On Fri, May 22, 2009 at 7:41 PM, George Song wrote: > > > On 5/22/2009 5:31 PM, Patrick wrote: > > > What is the best way to make queries on a manytomany table? > > > > Given the models below, how can I ge

Re: Making queries on manytomany tables

2009-05-22 Thread Alex Gaynor
On Fri, May 22, 2009 at 7:41 PM, George Song wrote: > > On 5/22/2009 5:31 PM, Patrick wrote: > > What is the best way to make queries on a manytomany table? > > > > Given the models below, how can I get a list of all the songs a > > particular artist has? > > > > class Artist(models.Model): > >

Re: Making queries on manytomany tables

2009-05-22 Thread George Song
On 5/22/2009 5:31 PM, Patrick wrote: > What is the best way to make queries on a manytomany table? > > Given the models below, how can I get a list of all the songs a > particular artist has? > > class Artist(models.Model): > name = models.CharField(max_length=128) > >def __unicode__(se