nicer model name

This commit is contained in:
Matthias 2021-11-12 02:05:41 +01:00
parent 6de0a211f7
commit 6e34119f85
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -40,3 +40,9 @@ class PluginConfig(models.Model):
verbose_name=_('Active'),
help_text=_('Is the plugin active'),
)
def __str__(self) -> str:
name = f'{self.name} - {self.key}'
if not self.active:
name += '(not active)'
return name