Extend item description

This commit is contained in:
Johannes Schriewer 2020-12-23 00:43:03 +01:00
parent 6ddfdddd00
commit 9fd744e186

View file

@ -21,7 +21,10 @@ class Item(CanBeContained):
changed_at = models.DateTimeField(auto_now=True)
def __str__(self):
return self.name + ", " + str(self.form_factor)
items = [self.name, self.description]
items.extend([tag.description for tag in self.tags.all()])
items.append(str(self.form_factor))
return ", ".join(items)
@property
def all_tags(self):