mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 03:56:43 +00:00
remove integration naming from docs
This commit is contained in:
parent
1782974df8
commit
37f72e9652
@ -51,7 +51,6 @@ class PluginsRegistry:
|
|||||||
self.apps_loading = True # Marks if apps were reloaded yet
|
self.apps_loading = True # Marks if apps were reloaded yet
|
||||||
self.git_is_modern = True # Is a modern version of git available
|
self.git_is_modern = True # Is a modern version of git available
|
||||||
|
|
||||||
# integration specific
|
|
||||||
self.installed_apps = [] # Holds all added plugin_paths
|
self.installed_apps = [] # Holds all added plugin_paths
|
||||||
|
|
||||||
# mixins
|
# mixins
|
||||||
@ -123,7 +122,7 @@ class PluginsRegistry:
|
|||||||
log_error({error.path: error.message}, 'load')
|
log_error({error.path: error.message}, 'load')
|
||||||
blocked_plugin = error.path # we will not try to load this app again
|
blocked_plugin = error.path # we will not try to load this app again
|
||||||
|
|
||||||
# Initialize apps without any integration plugins
|
# Initialize apps without any plugins
|
||||||
self._clean_registry()
|
self._clean_registry()
|
||||||
self._clean_installed_apps()
|
self._clean_installed_apps()
|
||||||
self._activate_plugins(force_reload=True)
|
self._activate_plugins(force_reload=True)
|
||||||
@ -192,9 +191,7 @@ class PluginsRegistry:
|
|||||||
logger.info('Finished reloading plugins')
|
logger.info('Finished reloading plugins')
|
||||||
|
|
||||||
def collect_plugins(self):
|
def collect_plugins(self):
|
||||||
"""
|
"""Collect plugins from all possible ways of loading"""
|
||||||
Collect integration plugins from all possible ways of loading
|
|
||||||
"""
|
|
||||||
|
|
||||||
if not settings.PLUGINS_ENABLED:
|
if not settings.PLUGINS_ENABLED:
|
||||||
# Plugins not enabled, do nothing
|
# Plugins not enabled, do nothing
|
||||||
@ -274,7 +271,7 @@ class PluginsRegistry:
|
|||||||
|
|
||||||
logger.info('Starting plugin initialisation')
|
logger.info('Starting plugin initialisation')
|
||||||
|
|
||||||
# Initialize integration plugins
|
# Initialize plugins
|
||||||
for plugin in self.plugin_modules:
|
for plugin in self.plugin_modules:
|
||||||
# Check if package
|
# Check if package
|
||||||
was_packaged = getattr(plugin, 'is_package', False)
|
was_packaged = getattr(plugin, 'is_package', False)
|
||||||
@ -337,7 +334,7 @@ class PluginsRegistry:
|
|||||||
|
|
||||||
def _activate_plugins(self, force_reload=False):
|
def _activate_plugins(self, force_reload=False):
|
||||||
"""
|
"""
|
||||||
Run integration functions for all plugins
|
Run activation functions for all plugins
|
||||||
|
|
||||||
:param force_reload: force reload base apps, defaults to False
|
:param force_reload: force reload base apps, defaults to False
|
||||||
:type force_reload: bool, optional
|
:type force_reload: bool, optional
|
||||||
@ -351,9 +348,7 @@ class PluginsRegistry:
|
|||||||
self.activate_integration_app(plugins, force_reload=force_reload)
|
self.activate_integration_app(plugins, force_reload=force_reload)
|
||||||
|
|
||||||
def _deactivate_plugins(self):
|
def _deactivate_plugins(self):
|
||||||
"""
|
"""Run deactivation functions for all plugins"""
|
||||||
Run integration deactivation functions for all plugins
|
|
||||||
"""
|
|
||||||
|
|
||||||
self.deactivate_integration_app()
|
self.deactivate_integration_app()
|
||||||
self.deactivate_integration_schedule()
|
self.deactivate_integration_schedule()
|
||||||
@ -520,9 +515,7 @@ class PluginsRegistry:
|
|||||||
return plugin_path
|
return plugin_path
|
||||||
|
|
||||||
def deactivate_integration_app(self):
|
def deactivate_integration_app(self):
|
||||||
"""
|
"""Deactivate AppMixin plugins - some magic required"""
|
||||||
Deactivate integration app - some magic required
|
|
||||||
"""
|
|
||||||
|
|
||||||
# unregister models from admin
|
# unregister models from admin
|
||||||
for plugin_path in self.installed_apps:
|
for plugin_path in self.installed_apps:
|
||||||
|
@ -5,7 +5,7 @@ from plugin.mixins import UrlsMixin
|
|||||||
|
|
||||||
class NoIntegrationPlugin(InvenTreePlugin):
|
class NoIntegrationPlugin(InvenTreePlugin):
|
||||||
"""
|
"""
|
||||||
An basic integration plugin
|
An basic plugin
|
||||||
"""
|
"""
|
||||||
|
|
||||||
NAME = "NoIntegrationPlugin"
|
NAME = "NoIntegrationPlugin"
|
||||||
@ -13,7 +13,7 @@ class NoIntegrationPlugin(InvenTreePlugin):
|
|||||||
|
|
||||||
class WrongIntegrationPlugin(UrlsMixin, InvenTreePlugin):
|
class WrongIntegrationPlugin(UrlsMixin, InvenTreePlugin):
|
||||||
"""
|
"""
|
||||||
An basic integration plugin
|
An basic wron plugin with urls
|
||||||
"""
|
"""
|
||||||
|
|
||||||
NAME = "WrongIntegrationPlugin"
|
NAME = "WrongIntegrationPlugin"
|
||||||
|
@ -4,7 +4,7 @@ from plugin import InvenTreePlugin
|
|||||||
|
|
||||||
class BrokenFileIntegrationPlugin(InvenTreePlugin):
|
class BrokenFileIntegrationPlugin(InvenTreePlugin):
|
||||||
"""
|
"""
|
||||||
An very broken integration plugin
|
An very broken plugin
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""sample of a broken integration plugin"""
|
"""sample of a broken plugin"""
|
||||||
from plugin import InvenTreePlugin
|
from plugin import InvenTreePlugin
|
||||||
|
|
||||||
|
|
||||||
class BrokenIntegrationPlugin(InvenTreePlugin):
|
class BrokenIntegrationPlugin(InvenTreePlugin):
|
||||||
"""
|
"""
|
||||||
An very broken integration plugin
|
An very broken plugin
|
||||||
"""
|
"""
|
||||||
NAME = 'Test'
|
NAME = 'Test'
|
||||||
TITLE = 'Broken Plugin'
|
TITLE = 'Broken Plugin'
|
||||||
|
@ -12,7 +12,7 @@ from django.urls import include, re_path
|
|||||||
|
|
||||||
class SampleIntegrationPlugin(AppMixin, SettingsMixin, UrlsMixin, NavigationMixin, InvenTreePlugin):
|
class SampleIntegrationPlugin(AppMixin, SettingsMixin, UrlsMixin, NavigationMixin, InvenTreePlugin):
|
||||||
"""
|
"""
|
||||||
A full integration plugin example
|
A full plugin example
|
||||||
"""
|
"""
|
||||||
|
|
||||||
NAME = "SampleIntegrationPlugin"
|
NAME = "SampleIntegrationPlugin"
|
||||||
|
@ -16,7 +16,7 @@ register = template.Library()
|
|||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
def plugin_list(*args, **kwargs):
|
def plugin_list(*args, **kwargs):
|
||||||
"""
|
"""
|
||||||
List of all installed integration plugins
|
List of all installed plugins
|
||||||
"""
|
"""
|
||||||
return registry.plugins
|
return registry.plugins
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ def plugin_list(*args, **kwargs):
|
|||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
def inactive_plugin_list(*args, **kwargs):
|
def inactive_plugin_list(*args, **kwargs):
|
||||||
"""
|
"""
|
||||||
List of all inactive integration plugins
|
List of all inactive plugins
|
||||||
"""
|
"""
|
||||||
return registry.plugins_inactive
|
return registry.plugins_inactive
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user