mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Revert "remove url load setting for plugin"
This reverts commit e37477eb15
.
This commit is contained in:
parent
f86bd4dd6b
commit
1c93a126ae
@ -43,6 +43,7 @@ from .views import AppearanceSelectView, SettingCategorySelectView
|
|||||||
from .views import DynamicJsView
|
from .views import DynamicJsView
|
||||||
|
|
||||||
from common.views import SettingEdit, UserSettingEdit
|
from common.views import SettingEdit, UserSettingEdit
|
||||||
|
from common.models import InvenTreeSetting
|
||||||
|
|
||||||
from .api import InfoView, NotFoundView
|
from .api import InfoView, NotFoundView
|
||||||
from .api import ActionPluginView
|
from .api import ActionPluginView
|
||||||
@ -126,7 +127,13 @@ translated_javascript_urls = [
|
|||||||
|
|
||||||
# Integration plugin urls
|
# Integration plugin urls
|
||||||
interation_urls = []
|
interation_urls = []
|
||||||
for plugin in settings.INTEGRATION_PLUGINS.values():
|
plugin_url_enabled = False
|
||||||
|
try:
|
||||||
|
plugin_url_enabled = InvenTreeSetting.get_setting('ENABLE_PLUGINS_URL')
|
||||||
|
except Exception as _e:
|
||||||
|
print(_e)
|
||||||
|
if settings.TESTING or plugin_url_enabled:
|
||||||
|
for plugin in settings.INTEGRATION_PLUGINS.values():
|
||||||
if plugin.mixin_enabled('urls'):
|
if plugin.mixin_enabled('urls'):
|
||||||
interation_urls.append(plugin.urlpatterns)
|
interation_urls.append(plugin.urlpatterns)
|
||||||
|
|
||||||
|
@ -875,6 +875,12 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
|||||||
'default': '',
|
'default': '',
|
||||||
'choices': settings_group_options
|
'choices': settings_group_options
|
||||||
},
|
},
|
||||||
|
'ENABLE_PLUGINS_URL': {
|
||||||
|
'name': _('Enable URL integration'),
|
||||||
|
'description': _('Enable plugins to add URL routes'),
|
||||||
|
'default': False,
|
||||||
|
'validator': bool,
|
||||||
|
},
|
||||||
'ENABLE_PLUGINS_NAVIGATION': {
|
'ENABLE_PLUGINS_NAVIGATION': {
|
||||||
'name': _('Enable navigation integration'),
|
'name': _('Enable navigation integration'),
|
||||||
'description': _('Enable plugins to integrate into navigation'),
|
'description': _('Enable plugins to integrate into navigation'),
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
{% include "InvenTree/settings/header.html" %}
|
||||||
<tbody>
|
<tbody>
|
||||||
|
{% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_URL" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_NAVIGATION" %}
|
{% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_NAVIGATION" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_SETTING"%}
|
{% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_SETTING"%}
|
||||||
{% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_APP"%}
|
{% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_APP"%}
|
||||||
|
Loading…
Reference in New Issue
Block a user