mirror of
https://github.com/inventree/inventree-docs.git
synced 2025-04-28 13:46:54 +00:00
fix links
This commit is contained in:
parent
dc71db8ba9
commit
09f0c85b76
@ -87,7 +87,7 @@ For development new plugins can be placed ina a subdirectroy in `src/InvenTree/p
|
|||||||
|
|
||||||
#### Mixins
|
#### 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.
|
Common use cases are covered by pre-supplied modules in the form of mixins (similar to how [django](https://docs.djangoproject.com/en/3.2/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.
|
||||||
|
|
||||||
##### Basic Mixin Functions
|
##### Basic Mixin Functions
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ This mixin defines the helper functions `plugin.get_setting` and `plugin.set_set
|
|||||||
#### UrlsMixin
|
#### UrlsMixin
|
||||||
|
|
||||||
Use the class constant `URLS` for a array of URLs that should be added to InvenTrees URL paths or override the `plugin.setup_urls` function.
|
Use the class constant `URLS` for a array of URLs that should be added to InvenTrees URL paths or override the `plugin.setup_urls` function.
|
||||||
The array has to contain valid URL patterns as defined in the [https://docs.djangoproject.com/en/3.2/topics/http/urls/](django documentation).
|
The array has to contain valid URL patterns as defined in the [django documentation](https://docs.djangoproject.com/en/3.2/topics/http/urls/).
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
URLS = [
|
URLS = [
|
||||||
@ -145,7 +145,7 @@ URLS = [
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
The URLs get exposed under `/plugin/{plugin.slug}/*` and get exposed to the template engine with the prefix `plugin:{plugin.slug}:` (for usage with the [https://docs.djangoproject.com/en/3.2/ref/templates/builtins/#url](url tag)).
|
The URLs get exposed under `/plugin/{plugin.slug}/*` and get exposed to the template engine with the prefix `plugin:{plugin.slug}:` (for usage with the [url tag](https://docs.djangoproject.com/en/3.2/ref/templates/builtins/#url)).
|
||||||
|
|
||||||
|
|
||||||
#### NavigationMixin
|
#### NavigationMixin
|
||||||
@ -167,4 +167,4 @@ The optional class constants `NAVIGATION_TAB_NAME` and `NAVIGATION_TAB_ICON` can
|
|||||||
If this mixin is added to a plugin the directory the plugin class is defined in is added to InvenTrees `INSTALLED_APPS`.
|
If this mixin is added to a plugin the directory the plugin class is defined in is added to InvenTrees `INSTALLED_APPS`.
|
||||||
|
|
||||||
!!! warning "Danger Zone"
|
!!! warning "Danger Zone"
|
||||||
Only use this plugin if you have an understanding of djangos [https://docs.djangoproject.com/en/3.2/ref/applications/](app system). Plugins with this mixin are deeply integrated into InvenTree and can cause difficult to reproduce or long-running errors. Use the built-in testing functions of django to make sure your code does not cause unwanted behaviour in InvenTree.
|
Only use this plugin if you have an understanding of djangos [app system](https://docs.djangoproject.com/en/3.2/ref/applications). Plugins with this mixin are deeply integrated into InvenTree and can cause difficult to reproduce or long-running errors. Use the built-in testing functions of django to make sure your code does not cause unwanted behaviour in InvenTree.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user