diff options
| author | Christopher Long <indirecthit@gmail.com> | 2006-10-27 02:11:46 +0000 |
|---|---|---|
| committer | Christopher Long <indirecthit@gmail.com> | 2006-10-27 02:11:46 +0000 |
| commit | f6fa1032968d8baaf2a30f8478793e8592c72c72 (patch) | |
| tree | 00a0ceed348fb68e15575f70621749210d8f0968 /tests/modeltests/basic | |
| parent | 3f60a8e98d90c1fce40017a2e01b0b4643d91bd6 (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.py | 4 |
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) |
