diff options
| author | 2019-10-11 19:49:07 +0200 | |
|---|---|---|
| committer | 2019-10-11 19:49:07 +0200 | |
| commit | 87105f2c31e5384428e9f44a146b60d2f95fb67b (patch) | |
| tree | 3111ffed0f2b658c51721190480e3b38daff5625 | |
| parent | Allow viewing log entries in the Django Admin. (diff) | |
Pluralize properly.
| -rw-r--r-- | pydis_site/apps/api/migrations/0044_add_plural_name_for_log_entry.py | 17 | ||||
| -rw-r--r-- | pydis_site/apps/api/models/log_entry.py | 5 | 
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' | 
