aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r--pydis_site/apps/api/models/bot/nomination.py5
-rw-r--r--pydis_site/apps/api/models/log_entry.py5
2 files changed, 10 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})"
diff --git a/pydis_site/apps/api/models/log_entry.py b/pydis_site/apps/api/models/log_entry.py
index acd7953a..488af48e 100644
--- a/pydis_site/apps/api/models/log_entry.py
+++ b/pydis_site/apps/api/models/log_entry.py
@@ -48,3 +48,8 @@ class LogEntry(ModelReprMixin, models.Model):
message = models.TextField(
help_text="The textual content of the log line."
)
+
+ class Meta:
+ """Customizes the default generated plural name to valid English."""
+
+ verbose_name_plural = 'Log entries'