1
0
mirror of https://github.com/fspc/workstand.git synced 2025-02-23 09:13:23 -05:00

Sensbile string representation

This commit is contained in:
Drew Larson 2017-01-01 17:29:12 -06:00
parent 26c009a537
commit 7ef35a6b53

View File

@ -69,3 +69,7 @@ class Visit(models.Model):
) )
created_at = models.DateTimeField(auto_now_add=True) created_at = models.DateTimeField(auto_now_add=True)
purpose = models.CharField(max_length=50, choices=visit_choices) purpose = models.CharField(max_length=50, choices=visit_choices)
def __str__(self):
return '<Visit purpose: {purpose} created_at: {created_at}>'.format(purpose=self.purpose,
created_at=self.created_at.isoformat())