diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-09-16 01:57:25 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-09-16 01:57:25 +0000 |
| commit | e2409750f8a551d3094e44f9795d94188a45c606 (patch) | |
| tree | 01c57003a2a92ec703f1472719abbb2aea8517b8 /tests/modeltests/basic/models.py | |
| parent | 1de4bf0b66d5c59f3b46767f9506ee2a78b64540 (diff) | |
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
Diffstat (limited to 'tests/modeltests/basic/models.py')
| -rw-r--r-- | tests/modeltests/basic/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py index 0a09579761..58770ef2ce 100644 --- a/tests/modeltests/basic/models.py +++ b/tests/modeltests/basic/models.py @@ -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' |
