From c0ed15f3196b5e7b0998113d24616761400df239 Mon Sep 17 00:00:00 2001 From: CM Lubinski Date: Fri, 9 Jun 2017 16:09:57 -0400 Subject: [PATCH] Add the office name to the Django admin. Django models should always have a __str__; otherwise, when the model is in a select field, it'll just say, e.g. "Agency Object". --- reqs/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reqs/models.py b/reqs/models.py index ca7aa5cd2..a048a6072 100644 --- a/reqs/models.py +++ b/reqs/models.py @@ -91,6 +91,9 @@ class PolicyTypes(Enum): class Office(models.Model): name = models.CharField(max_length=256) + def __str__(self): + return self.name + class Policy(models.Model): class Meta: