Am 22.08.2008 um 23:15 schrieb Garrett Garcia: > How about: > > songs = Recording.objects.filter(song__title__startswith='R', > represents_song=True) > > http://www.djangoproject.com/documentation/db-api/#filter-kwargs > > "Multiple parameters are joined via AND in the underlying SQL > statement." > > - Garrett
The problem I still see with this is that this is a query set containing recordings, not songs. Let's assume there can be several recordings that represent the song and thus can have "represents_song=True". If you had the query from above, songs = Recording.objects.filter(song__title__startswith='R', represents_song=True), how would you display the songs in the template in a way that the songs and recordings would order like this: song_1_title song_1_representative_recording_1 song_1_representative_recording_2 song_1_representative_recording_3 song_2_title song_2_representative_recording_1 song_2_representative_recording_2 ... ? -benjamin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---