diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-02-22 04:58:28 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-02-22 04:58:28 +0000 |
| commit | b7be3d63e36ee79db51dcabf0f210349e4d6f715 (patch) | |
| tree | f62cc873376eb4d6a060761fdc767cfe6a4809cf /tests | |
| parent | 0c20e88e65b8c2b1d097510ee2d7cfe6b2cf9b97 (diff) | |
queryset-refactor: Added the ability to manually specify a child-parent link.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/model_inheritance/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/modeltests/model_inheritance/models.py b/tests/modeltests/model_inheritance/models.py index 1187c5fe64..df0fb77ccb 100644 --- a/tests/modeltests/model_inheritance/models.py +++ b/tests/modeltests/model_inheritance/models.py @@ -67,6 +67,8 @@ class Supplier(Place): return u"%s the supplier" % self.name class ParkingLot(Place): + # An explicit link to the parent (we can control the attribute name). + parent = models.OneToOneField(Place, primary_key=True, parent_link=True) main_site = models.ForeignKey(Place, related_name='lot') def __unicode__(self): |
