mirror of
				https://github.com/inventree/inventree-docs.git
				synced 2025-11-04 14:35:38 +00:00 
			
		
		
		
	Improve plugins docs (#381)
* Add info about package discovery Closes https://github.com/inventree/inventree-docs/issues/352#issuecomment-1286636837 * specifiy that the install must be in the venv * Django should be capitalised
This commit is contained in:
		@@ -49,6 +49,10 @@ from plugin.mixins import APICallMixin, SettingsMixin, ScheduleMixin, BarcodeMix
 | 
			
		||||
 | 
			
		||||
### Packaging
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
!!! tip "Package-Discovery can be tricky"
 | 
			
		||||
    Most problems with packaging stem from problems with dicovery. [This guide](https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#automatic-discovery) by the PyPA contains a lot of information about discovery during packaging. Theses mechanisms generally apply to most discovery processes in InvenTree and the wider Django ecosystem.
 | 
			
		||||
 | 
			
		||||
The recommended way of distribution is as a [PEP 561](https://peps.python.org/pep-0561/) compliant package. If you can use the official Package Index (PyPi - [official website](https://pypi.org/)) as a registry.  
 | 
			
		||||
Please follow PyPAs official [packaging guide](https://packaging.python.org/en/latest/tutorials/packaging-projects/) to ensure your package installs correctly suing InvenTrees install mechanisms.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@ The InvenTree server code supports an extensible plugin architecture, allowing c
 | 
			
		||||
 | 
			
		||||
Plugins can be added from multiple sources:
 | 
			
		||||
 | 
			
		||||
- Plugins can be installed via PIP (python package manager)
 | 
			
		||||
- Plugins can be installed in InvenTrees venv via PIP (python package manager)
 | 
			
		||||
- Custom plugins should be placed in the directory `./InvenTree/plugins`.
 | 
			
		||||
- InvenTree built-in plugins are located in the directory `./InvenTree/plugin/builtin`.  
 | 
			
		||||
 | 
			
		||||
@@ -91,7 +91,7 @@ The configuration entries must be enabled via the [InvenTree admin interface](..
 | 
			
		||||
 | 
			
		||||
### Plugin Mixins
 | 
			
		||||
 | 
			
		||||
Common use cases are covered by pre-supplied modules in the form of *mixins* (similar to how [django](https://docs.djangoproject.com/en/stable/topics/class-based-views/mixins/) 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.
 | 
			
		||||
Common use cases are covered by pre-supplied modules in the form of *mixins* (similar to how [Django](https://docs.djangoproject.com/en/stable/topics/class-based-views/mixins/) 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.
 | 
			
		||||
 | 
			
		||||
Supported mixin classes are:
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user