From 238c841239c7bb01ae64b2bbe0f41bf70598d275 Mon Sep 17 00:00:00 2001 From: Midgard Date: Sun, 26 Jan 2020 15:40:04 +0100 Subject: [PATCH] Add location's attributes in Location.str --- app/hlds/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/hlds/models.py b/app/hlds/models.py index cbeafe8..be9129c 100644 --- a/app/hlds/models.py +++ b/app/hlds/models.py @@ -85,11 +85,13 @@ class Location: def __str__(self): return ( "============================\n" - "{0.id}: {0.name}\n" + "{0.id}: {0.name}" + "{1}\n" "============================\n" "\n" - "{1}" + "{2}" ).format( self, + "".join("\n\t{} {}".format(k, v) for k, v in self.attributes.items()), "\n".join(map(str, self.dishes)) )