feat: make display of location nicer
This commit is contained in:
parent
eb930b71d6
commit
8641bead80
@ -58,6 +58,9 @@ class Location(models.Model):
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
def __str__(self):
|
||||
if self.city and self.postcode:
|
||||
return f"{self.city} ({self.postcode})"
|
||||
else:
|
||||
return f"{self.name} ({self.latitude:.5}, {self.longitude:.5})"
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user