summaryrefslogtreecommitdiff
path: root/tests/modeltests/model_inheritance/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modeltests/model_inheritance/models.py')
-rw-r--r--tests/modeltests/model_inheritance/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/modeltests/model_inheritance/models.py b/tests/modeltests/model_inheritance/models.py
index f2d184017c..473cf24a9f 100644
--- a/tests/modeltests/model_inheritance/models.py
+++ b/tests/modeltests/model_inheritance/models.py
@@ -10,20 +10,20 @@ class Place(models.Model):
name = models.CharField(maxlength=50)
address = models.CharField(maxlength=80)
- def __repr__(self):
+ def __str__(self):
return "%s the place" % self.name
class Restaurant(Place):
serves_hot_dogs = models.BooleanField()
serves_pizza = models.BooleanField()
- def __repr__(self):
+ def __str__(self):
return "%s the restaurant" % self.name
class ItalianRestaurant(Restaurant):
serves_gnocchi = models.BooleanField()
- def __repr__(self):
+ def __str__(self):
return "%s the italian restaurant" % self.name
API_TESTS = """