remove url load setting for plugin

This commit is contained in:
Matthias 2021-10-19 19:54:20 +02:00
parent 69ee4ea14f
commit e37477eb15
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
3 changed files with 3 additions and 16 deletions

View File

@ -127,15 +127,9 @@ translated_javascript_urls = [
# Integration plugin urls # Integration plugin urls
interation_urls = [] interation_urls = []
plugin_url_enabled = False for plugin in settings.INTEGRATION_PLUGINS.values():
try: if plugin.mixin_enabled('urls'):
plugin_url_enabled = InvenTreeSetting.get_setting('ENABLE_PLUGINS_URL') interation_urls.append(plugin.urlpatterns)
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'):
interation_urls.append(plugin.urlpatterns)
urlpatterns = [ urlpatterns = [
url(r'^part/', include(part_urls)), url(r'^part/', include(part_urls)),

View File

@ -875,12 +875,6 @@ 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'),

View File

@ -19,7 +19,6 @@
<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"%}