aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models/bot
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2019-10-11 23:48:42 +0200
committerGravatar GitHub <[email protected]>2019-10-11 23:48:42 +0200
commit20b757eb5364f5930dcc490a5e0811ddc458ba38 (patch)
tree16c4915fe18b68c1f93236f8d455d6abf02c8d1c /pydis_site/apps/api/models/bot
parentImprove homepage flex responsiveness (diff)
parentMerge pull request #272 from python-discord/tizzysaurus_landing_page_text (diff)
Merge branch 'master' into fix-home-responsive
Diffstat (limited to 'pydis_site/apps/api/models/bot')
-rw-r--r--pydis_site/apps/api/models/bot/nomination.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pydis_site/apps/api/models/bot/nomination.py b/pydis_site/apps/api/models/bot/nomination.py
index 8a8f4d36..cd9951aa 100644
--- a/pydis_site/apps/api/models/bot/nomination.py
+++ b/pydis_site/apps/api/models/bot/nomination.py
@@ -39,3 +39,8 @@ class Nomination(ModelReprMixin, models.Model):
help_text="When the nomination was ended.",
null=True
)
+
+ def __str__(self):
+ """Representation that makes the target and state of the nomination immediately evident."""
+ status = "active" if self.active else "ended"
+ return f"Nomination of {self.user} ({status})"