diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2006-06-06 01:21:49 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2006-06-06 01:21:49 +0000 |
| commit | e976ed1f7910fad03704f88853c5c5b36cbab134 (patch) | |
| tree | c4c8d32d4298f64ad9ce8e7813084c2f45a9dc40 /tests/modeltests/m2o_recursive2/models.py | |
| parent | 0c341d780ebcde0e81c81eda07e2db3aaa92549b (diff) | |
multi-auth: Merged to [3085]
git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@3086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/m2o_recursive2/models.py')
| -rw-r--r-- | tests/modeltests/m2o_recursive2/models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/modeltests/m2o_recursive2/models.py b/tests/modeltests/m2o_recursive2/models.py index 40b842dc92..93185c6a4c 100644 --- a/tests/modeltests/m2o_recursive2/models.py +++ b/tests/modeltests/m2o_recursive2/models.py @@ -14,7 +14,7 @@ class Person(models.Model): mother = models.ForeignKey('self', null=True, related_name='mothers_child_set') father = models.ForeignKey('self', null=True, related_name='fathers_child_set') - def __repr__(self): + def __str__(self): return self.full_name API_TESTS = """ @@ -29,13 +29,13 @@ API_TESTS = """ >>> kid.save() >>> kid.mother -Jane Smith +<Person: Jane Smith> >>> kid.father -John Smith Senior +<Person: John Smith Senior> >>> dad.fathers_child_set.all() -[John Smith Junior] +[<Person: John Smith Junior>] >>> mom.mothers_child_set.all() -[John Smith Junior] +[<Person: John Smith Junior>] >>> kid.mothers_child_set.all() [] >>> kid.fathers_child_set.all() |
