First, since this is my first post to this group, let me say that Django is phenomenal. So serious. In fact, "phenomenal" doesn't even begin to scratch the surface . . . using that phrase to describe it is an insult! Many, many thanks to everyone who has contributed!
On to business . . . I have 2 models that I'm using "for training": Content and Category with a ManyToMany field in Content to relate them. For test data, I have entered 3 categories and 3 pieces of content (one in each of the 3 categories). In my understanding of the docs, I expected to be able to use the line of code below to retrieve all pieces of content in the category with a slug of 'list-1'. However, that appears to not be the case, as every record from Content is returned. >>> Content.objects.filter(categories__slug__exact = 'list-1') [<Content: Piece 1>, <Content: Piece 2>, <Content: Da 3rd>] The results I actually want to get are accomplished via the following: >>> a = Category.objects.get(slug = 'list-1') >>> a.content_set.all() [<Content: Piece 1>] Should I expect these to be the same (in which case I'm doing something wrong) or does the section in the docs here ("Lookups that span relationships") . . . http://www.djangoproject.com/documentation/db-api/#lookups-that-span-relationships . . . only apply to One-to-many relationships? Thanks for any help. BTW, I'm using 0.96 -- -Ben --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---