aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-10-11 19:49:07 +0200
committerGravatar Johannes Christ <[email protected]>2019-10-11 19:49:07 +0200
commit87105f2c31e5384428e9f44a146b60d2f95fb67b (patch)
tree3111ffed0f2b658c51721190480e3b38daff5625 /pydis_site/apps
parentAllow viewing log entries in the Django Admin. (diff)
Pluralize properly.
Diffstat (limited to 'pydis_site/apps')
-rw-r--r--pydis_site/apps/api/migrations/0044_add_plural_name_for_log_entry.py17
-rw-r--r--pydis_site/apps/api/models/log_entry.py5
2 files changed, 22 insertions, 0 deletions
diff --git a/pydis_site/apps/api/migrations/0044_add_plural_name_for_log_entry.py b/pydis_site/apps/api/migrations/0044_add_plural_name_for_log_entry.py
new file mode 100644
index 00000000..6f388179
--- /dev/null
+++ b/pydis_site/apps/api/migrations/0044_add_plural_name_for_log_entry.py
@@ -0,0 +1,17 @@
+# Generated by Django 2.2.3 on 2019-10-11 17:48
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('api', '0043_infraction_hidden_warnings_to_notes'),
+ ]
+
+ operations = [
+ migrations.AlterModelOptions(
+ name='logentry',
+ options={'verbose_name_plural': 'Log entries'},
+ ),
+ ]
diff --git a/pydis_site/apps/api/models/log_entry.py b/pydis_site/apps/api/models/log_entry.py
index 55a022d7..cb7275f9 100644
--- a/pydis_site/apps/api/models/log_entry.py
+++ b/pydis_site/apps/api/models/log_entry.py
@@ -61,3 +61,8 @@ class LogEntry(ModelReprMixin, models.Model):
level = self.level[:4].upper()
return f'{timestamp} | {self.application} | {level} | {message}'
+
+ class Meta:
+ """Customizes the default generated plural name to valid English."""
+
+ verbose_name_plural = 'Log entries'