mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #3703 -- Added pk property to models. Thanks, Collin Grady and jeromie@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -33,6 +33,11 @@ __test__ = {'API_TESTS': """
|
||||
>>> a.id
|
||||
1L
|
||||
|
||||
# Models have a pk property that is an alias for the primary key attribute (by
|
||||
# default, the 'id' attribute).
|
||||
>>> a.pk
|
||||
1L
|
||||
|
||||
# Access database columns via Python attributes.
|
||||
>>> a.headline
|
||||
'Area man programs in Python'
|
||||
|
||||
Reference in New Issue
Block a user