fix toString
This commit is contained in:
parent
7d4886abe2
commit
bede78cf84
@ -58,10 +58,10 @@ class Client(models.Model):
|
|||||||
return self.accounting_for(2)
|
return self.accounting_for(2)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.uuid)
|
return '{}, {}'.format(self.location.name, self.uuid)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return str(self.client.location.name)
|
return '{}, {}'.format(self.location.name, self.uuid)
|
||||||
|
|
||||||
|
|
||||||
class Accounting(models.Model):
|
class Accounting(models.Model):
|
||||||
@ -72,10 +72,10 @@ class Accounting(models.Model):
|
|||||||
prize = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True)
|
prize = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.client.location.name
|
return '{}: {} -> {}, {}'.format(self.client.uuid, self.time_from, self.time_to, self.prize)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.client.location.name
|
return '{}: {} -> {}, {}'.format(self.client.uuid, self.time_from, self.time_to, self.prize)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ['-time_from']
|
ordering = ['-time_from']
|
||||||
|
Loading…
Reference in New Issue
Block a user