2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-23 09:35:30 +00:00

Adds a PanelMixin plugin mixin class

Intended to allow rendering of custom panels on pages
This commit is contained in:
Oliver Walters
2022-05-06 21:32:11 +10:00
parent 170cb54490
commit 28e16616e5
3 changed files with 69 additions and 1 deletions
@@ -0,0 +1,22 @@
"""
Sample plugin which renders custom panels on certain pages
"""
from plugin import IntegrationPluginBase
from plugin.mixins import PanelMixin
class CustomPanelSample(PanelMixin, IntegrationPluginBase):
"""
A sample plugin which renders some custom panels.
"""
PLUGIN_NAME = "CustomPanelExample"
PLUGIN_SLUG = "panel"
PLUGIN_TITLE = "Custom Panel Example"
def get_custom_panels(self, page, instance, request):
print("get_custom_panels:")
return []