2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

human name for plugins

This commit is contained in:
Matthias
2021-10-04 12:31:12 +02:00
parent d1c2a399eb
commit 258d159093
4 changed files with 12 additions and 4 deletions

View File

@ -255,6 +255,14 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
name = self.plugin_name()
return slugify(name)
@property
def human_name(self):
"""human readable name for labels etc."""
name = getattr(self, 'PLUGIN_TITLE', None)
if not name:
name = self.plugin_name()
return name
def mixin(self, key):
"""check if mixin is registered"""
return key in self._mixins