mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user