summaryrefslogtreecommitdiff
path: root/tests/modeltests/basic/models.py
diff options
context:
space:
mode:
authorJason Pellerin <jpellerin@gmail.com>2006-11-29 20:16:50 +0000
committerJason Pellerin <jpellerin@gmail.com>2006-11-29 20:16:50 +0000
commitf8217026f9618adb65ab2d517025e87b98ed2fbe (patch)
tree2ab846582343dc9b0894b0bdffa3fe04f590365b /tests/modeltests/basic/models.py
parent9a01534370a272e59f2bb64251d1f46218a32516 (diff)
[multi-db] Merge trunk to [3850]. Some tests still failing.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@4142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/basic/models.py')
-rw-r--r--tests/modeltests/basic/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py
index acbea0d1e0..5638865f31 100644
--- a/tests/modeltests/basic/models.py
+++ b/tests/modeltests/basic/models.py
@@ -86,6 +86,10 @@ DoesNotExist: Article matching query does not exist.
>>> Article.objects.get(pk=1)
<Article: Area woman programs in Python>
+# pk can be used as a shortcut for the primary key name in any query
+>>> Article.objects.filter(pk__in=[1])
+[<Article: Area woman programs in Python>]
+
# Model instances of the same type and same ID are considered equal.
>>> a = Article.objects.get(pk=1)
>>> b = Article.objects.get(pk=1)