diff --git a/InvenTree/plugins/integration.py b/InvenTree/plugins/integration.py index 246aa34fd4..76a5add70c 100644 --- a/InvenTree/plugins/integration.py +++ b/InvenTree/plugins/integration.py @@ -9,6 +9,7 @@ import inspect from django.conf.urls import url, include from django.conf import settings from django.utils.text import slugify +from django.utils.translation import ugettext_lazy as _ import plugins.plugin as plugin @@ -255,6 +256,8 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin): """ PLUGIN_SLUG = None + AUTHOR = None + def __init__(self): super().__init__() self.add_mixin('base') @@ -280,6 +283,16 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin): name = self.plugin_name() return name + @property + def author(self): + """returns author of plugin - either from plugin settings or git""" + name = getattr(self, 'AUTHOR', None) + if not name: + name = self.commit.get('author') + if not name: + name = _('No author found') + return name + # mixins def mixin(self, key): """check if mixin is registered""" diff --git a/InvenTree/templates/InvenTree/settings/plugin.html b/InvenTree/templates/InvenTree/settings/plugin.html index 6cc340f164..2a14cb7fa0 100644 --- a/InvenTree/templates/InvenTree/settings/plugin.html +++ b/InvenTree/templates/InvenTree/settings/plugin.html @@ -46,7 +46,7 @@ {% endfor %} {% endif %} - # TODO + {{ plugin.author }} {{plugin.commit.date}} {% endfor %}