From ca1fce4cf390cf3bd4d661c8cadb14e71edecb0b Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 18 Sep 2021 02:08:33 +0200 Subject: [PATCH] make plugin path a setting --- InvenTree/InvenTree/settings.py | 2 ++ InvenTree/InvenTree/urls.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index b1bf4ab05f..295bb442c9 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -650,6 +650,8 @@ MESSAGE_TAGS = { } # Plugins +PLUGIN_URL = 'plugin' + INTEGRATION_PLUGINS = inventree_plugins.load_integration_plugins() INTEGRATION_PLUGIN_SETTINGS = {} diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 11fa976869..1424a26503 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -179,7 +179,7 @@ urlpatterns = [ url(r'^api-doc/', include_docs_urls(title='InvenTree API')), # plugins - url(r'^plugin/', include(interation_urls)), + url(f'^{settings.PLUGIN_URL}/', include(interation_urls)), url(r'^markdownx/', include('markdownx.urls')), ]