From 87105f2c31e5384428e9f44a146b60d2f95fb67b Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Fri, 11 Oct 2019 19:49:07 +0200 Subject: Pluralize properly. --- .../migrations/0044_add_plural_name_for_log_entry.py | 17 +++++++++++++++++ pydis_site/apps/api/models/log_entry.py | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 pydis_site/apps/api/migrations/0044_add_plural_name_for_log_entry.py (limited to 'pydis_site') 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' -- cgit v1.2.3