2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-22 15:21:52 +00:00

Better labels for objects in admin console

This commit is contained in:
Philip Sargent 2021-04-20 19:47:08 +01:00
parent 7a6578e205
commit 3b0c6ef2ea
2 changed files with 6 additions and 1 deletions

View File

@ -459,7 +459,7 @@ class QM(TroggleModel):
comment=models.TextField(blank=True,null=True)
def __str__(self):
return "%s %s" % (self.code(), self.grade)
return f'{self.nearest_station_name}, {self.code()}-{self.grade}'
def code(self):
if self.found_by:

View File

@ -81,6 +81,11 @@ class SurvexStation(models.Model):
else:
return r
class Meta:
ordering = ('id',)
def __str__(self):
return self.name and str(self.name) or 'no name'
#
# Single SurvexBlock
#