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:
@@ -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 []
|
||||
Reference in New Issue
Block a user