From 357f63180fefde66cd0db2be41b6a926e10c3c4f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 13 Nov 2021 01:40:05 +0100 Subject: [PATCH] add settings url --- InvenTree/plugin/integration.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/InvenTree/plugin/integration.py b/InvenTree/plugin/integration.py index ae0d71f0d4..6b142e3b24 100644 --- a/InvenTree/plugin/integration.py +++ b/InvenTree/plugin/integration.py @@ -9,6 +9,7 @@ from datetime import datetime import pathlib from django.conf.urls import url, include +from django.urls.base import reverse from django.conf import settings from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ @@ -362,6 +363,11 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin): return self.__module__ return pathlib.Path(self.def_path).relative_to(settings.BASE_DIR) + @property + def settings_url(self): + """returns url to the settings panel""" + return f'{reverse("settings")}#select-plugin-{self.slug}' + # region mixins def mixin(self, key): """check if mixin is registered"""