From d363063add8b268bade69d348fad680c8784cca6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 18 Sep 2021 03:41:41 +0200 Subject: [PATCH] remove duplicate functions --- InvenTree/plugins/integration/integration.py | 49 -------------------- 1 file changed, 49 deletions(-) diff --git a/InvenTree/plugins/integration/integration.py b/InvenTree/plugins/integration/integration.py index 96cac27683..c556e34f61 100644 --- a/InvenTree/plugins/integration/integration.py +++ b/InvenTree/plugins/integration/integration.py @@ -93,52 +93,3 @@ class IntegrationPlugin(plugin.InvenTreePlugin): def module(self, key): return key in self.mixins - - def setup_urls(self): - """ - setup url endpoints for this plugin - """ - if self.urlpatterns: - return self.urlpatterns - return None - - @property - def base_url(self): - return f'{settings.PLUGIN_URL}/{self.plugin_name()}/' - - @property - def urlpatterns(self): - """ - retruns the urlpatterns for this plugin - """ - if self.has_urls: - return url(f'^{self.plugin_name()}/', include(self.urls), name=self.plugin_name()) - return None - - @property - def has_urls(self): - """ - does this plugin use custom urls - """ - return bool(self.urls) - - def setup_settings(self): - """ - setup settings for this plugin - """ - if self.SETTINGS: - return self.SETTINGS - return None - - @property - def has_settings(self): - """ - does this plugin use custom settings - """ - return bool(self.settings) - - @property - def settingspatterns(self): - if self.has_settings: - return {f'PLUGIN_{self.plugin_name().upper()}_{key}': value for key, value in self.settings.items()} - return None