Thing.__str___ improved, though I'm still not quite happy with it

2019-08-17
Marnanel Thurman 2019-05-29 09:50:01 +01:00
rodzic 0b3ee9a226
commit 54465e537e
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -90,13 +90,14 @@ class Thing(models.Model):
inactive_warning = ' INACTIVE'
if self.f_name:
name = self.f_name
details = self.f_name
else:
name = self.url
details = self.url
result = '[%s %s%s]' % (
result = '[%s %s %s%s]' % (
self.number,
self.f_type,
name,
details,
inactive_warning,
)
return result