summaryrefslogtreecommitdiff
path: root/tests/modeltests/basic
diff options
context:
space:
mode:
authorChristopher Long <indirecthit@gmail.com>2006-10-27 02:11:46 +0000
committerChristopher Long <indirecthit@gmail.com>2006-10-27 02:11:46 +0000
commitf6fa1032968d8baaf2a30f8478793e8592c72c72 (patch)
tree00a0ceed348fb68e15575f70621749210d8f0968 /tests/modeltests/basic
parent3f60a8e98d90c1fce40017a2e01b0b4643d91bd6 (diff)
[per-object-permissions] Merged to trunk [3938]
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/basic')
-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)