From dc71db8ba9c1980557d64f1a9263c70b3b3b568d Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 3 Nov 2021 22:46:17 +0100 Subject: [PATCH] more info about loading --- docs/extend/plugins.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/extend/plugins.md b/docs/extend/plugins.md index 5251694..ff6dbb9 100644 --- a/docs/extend/plugins.md +++ b/docs/extend/plugins.md @@ -78,6 +78,13 @@ WEBSITE = None # Website for the plugin, developer etc. -> is shown in plugin o ``` + +#### Installing a Plugin + +Plugins can either be loaded from paths in the InvenTree install directory or as a plugin installed via pip. We recommend installation via pip as this enables hassle-free upgrades. + +For development new plugins can be placed ina a subdirectroy in `src/InvenTree/plugins`. Built-In plugins ship in `src/InvenTree/plugin/builtin`. To achive full unit-testing for all mixins there are some sample implementations in `src/InvenTree/plugin/samples`. These are not loaded in production mode. + #### Mixins Common use cases are covered by pre-supplied modules in the form of mixins (similar to how [https://docs.djangoproject.com/en/3.2/topics/class-based-views/mixins/](django) does it). Each mixin enables the integration into a specific area of InvenTree. Sometimes it also enhances the plugin with helper functions to supply often used functions out-of-the-box.