Thanks for the help, Russ.
> > For test data, I have entered 3 categories and 3 pieces of content
> > (one in each of the 3 categories).
>
> You have 3 categories and 3 content objects, but what is in the m2m
> table between them? What is the matrix of category/content
> relationships?

It's the content_categories relationship table the Django so kindly
creates for me.


> > 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 syntax appears right for the problem you are describing;

. . . and strangely enough it seems to work just fine in MySQL.
However, in sqlite I get the results previously described -- even
after resetting the database and re-adding the records and verifying
the expected result on the command line (1 record each in the
relationship table)

Very odd. Or maybe not so odd to somebody that's more familiar with
sqlite than I am. This is actually the first time I've ever used it
for anything.

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

Reply via email to