diff --git a/container/models.py b/container/models.py index 59ff1f7..b259202 100644 --- a/container/models.py +++ b/container/models.py @@ -21,6 +21,9 @@ class ContainerType(models.Model): changed_by = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET(get_deleted_user), related_name='changed_container_types') + def __str__(self): + return self.named_id + ': ' + self.description + class Container(models.Model): named_id = models.CharField(max_length=40) @@ -33,3 +36,6 @@ class Container(models.Model): changed_ts = models.DateTimeField('datetime updated', auto_now=True) changed_by = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET(get_deleted_user), related_name='changed_container') + + def __str__(self): + return self.named_id + ' (' + self.container_type.named_id + '): ' + self.description