summaryrefslogtreecommitdiff
path: root/tests/modeltests/basic/models.py
diff options
context:
space:
mode:
authorRobin Munn <robin.munn@gmail.com>2006-09-25 15:39:20 +0000
committerRobin Munn <robin.munn@gmail.com>2006-09-25 15:39:20 +0000
commit1bb4fa2cb66269b1eff3b7d73f8c7864c0622368 (patch)
tree99ebf72b9983e35e50e65d0d421949a2740bf105 /tests/modeltests/basic/models.py
parent8afc419b123f315d724cbefdbc4c07f0982627a9 (diff)
sqlalchemy: Merged revisions 3770 to 3831 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/sqlalchemy@3832 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)