From 9f3862ab2720d204c55cdc603a5e6cf798a949aa Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 15 Sep 2021 07:40:19 +0200 Subject: [PATCH] basic integration plugin --- InvenTree/plugins/integration/integration.py | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 InvenTree/plugins/integration/integration.py diff --git a/InvenTree/plugins/integration/integration.py b/InvenTree/plugins/integration/integration.py new file mode 100644 index 0000000000..fe6d96744d --- /dev/null +++ b/InvenTree/plugins/integration/integration.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- + +import logging + +import plugins.plugin as plugin + + +logger = logging.getLogger("inventree") + + +class IntegrationPlugin(plugin.InvenTreePlugin): + """ + The IntegrationPlugin class is used to integrate with 3rd party software + """ + + def __init__(self): + """ + """ + plugin.InvenTreePlugin.__init__(self) + + self.urls = self.setup_urls() + + def setup_urls(self): + """ + setup url endpoints for this plugin + """ + if self.urlpatterns: + return self.urlpatterns + return None + + @property + def has_urls(self): + """ + does this plugin use custom urls + """ + return bool(self.urls) +