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:
Malcolm Tredinnick 2007-09-16 01:57:25 +00:00
parent 1de4bf0b66
commit e2409750f8
4 changed files with 30 additions and 0 deletions

View file

@ -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'