Browse Source

Sensbile string representation

feature/python-error-tracking
Drew Larson 8 years ago
parent
commit
7ef35a6b53
  1. 4
      bikeshop_project/core/models.py

4
bikeshop_project/core/models.py

@ -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())

Loading…
Cancel
Save