So the models I am using are at
http://github.com/jarofgreen/TaggedWiki/blob/e45ede936ebc2e88c9b60de7572b5048da43c0e6/taggedwikitest/taggedwiki/models.py

Here is some test code to run on an empty DB:

>>> from taggedwiki.models import *
>>> s = Space.objects.create(Title='test')
>>> p1 = Page.objects.create(Title='blah', Body='', 
>>> Space=s,LastUpdateIP='127.0.0.1')
>>> p2 = Page.objects.create(Title='blah2', Body='', 
>>> Space=s,LastUpdateIP='127.0.0.1')
>>> p2.addTag('blah')
>>> Tag.objects.all()
[<Tag: blah>, <Tag: blah2>]
>>> Tag.objects.filter(page__Space=s)
[<Tag: blah>, <Tag: blah>, <Tag: blah2>]

Why is tag 'blah' repeated twice in that last query? I assumed that
the results from a query set would be unique - am I wrong? Are there
any other instances where you don't get unique objects?

Thanks for your help,
James
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to