magic-removal: Improved clarity of a test (now possible due to ordering on model)

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant 2006-03-03 22:42:16 +00:00
parent 4456e2c26c
commit 242e652fe7
1 changed files with 3 additions and 5 deletions

View File

@ -221,11 +221,9 @@ datetime.datetime(2005, 7, 28, 0, 0)
# You can combine queries with & and |.
>>> s1 = Article.objects.filter(id__exact=1)
>>> s2 = Article.objects.filter(id__exact=2)
>>> tmp = [a.id for a in list(s1 | s2)]
>>> tmp.sort()
>>> tmp
[1L, 2L]
>>> list(s1 & s2)
>>> s1 | s2
[Area woman programs in Python, Second article]
>>> s1 & s2
[]
# You can get the number of objects like this: