From d2621c75f52613b45cc289a89a8bdc0ec1055059 Mon Sep 17 00:00:00 2001 From: Feliciaan De Palmenaer Date: Sat, 28 Mar 2015 23:31:38 +0100 Subject: [PATCH] clearer model string representation --- app/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models.py b/app/models.py index 955b359..59ce694 100644 --- a/app/models.py +++ b/app/models.py @@ -54,7 +54,7 @@ class Location(db.Model): self.website = website def __repr__(self): - return '%s: %s' % (self.name, self.address) + return '%s' % (self.name) class Product(db.Model): @@ -71,7 +71,7 @@ class Product(db.Model): self.price = price def __repr__(self): - return '%s' % self.name + return '%s from %s' % (self.name, self.location) class Order(db.Model): @@ -90,7 +90,7 @@ class Order(db.Model): self.stoptime = stoptime def __repr__(self): - return 'Order %s' % (self.location.name) + return 'Order %d @ %s' % (self.id, self.location.name) def group_by_user(self): group = defaultdict(list)