diff --git a/InvenTree/plugin/samples/event/event_sample.py b/InvenTree/plugin/samples/event/event_sample.py index 5411781e05..bea21c3ea0 100644 --- a/InvenTree/plugin/samples/event/event_sample.py +++ b/InvenTree/plugin/samples/event/event_sample.py @@ -12,7 +12,7 @@ class EventPluginSample(EventMixin, InvenTreePlugin): """ NAME = "EventPlugin" - SLUG = "event" + SLUG = "sampleevent" TITLE = "Triggered Events" def process_event(self, event, *args, **kwargs): diff --git a/InvenTree/plugin/samples/integration/custom_panel_sample.py b/InvenTree/plugin/samples/integration/custom_panel_sample.py index 0203fc4e04..dd84a2a86f 100644 --- a/InvenTree/plugin/samples/integration/custom_panel_sample.py +++ b/InvenTree/plugin/samples/integration/custom_panel_sample.py @@ -15,17 +15,23 @@ class CustomPanelSample(PanelMixin, SettingsMixin, InvenTreePlugin): """ NAME = "CustomPanelExample" - SLUG = "panel" + SLUG = "samplepanel" TITLE = "Custom Panel Example" DESCRIPTION = "An example plugin demonstrating how custom panels can be added to the user interface" VERSION = "0.1" SETTINGS = { 'ENABLE_HELLO_WORLD': { - 'name': 'Hello World', + 'name': 'Enable Hello World', 'description': 'Enable a custom hello world panel on every page', 'default': False, 'validator': bool, + }, + 'ENABLE_BROKEN_PANEL': { + 'name': 'Enable Broken Panel', + 'description': 'Enable a panel with rendering issues', + 'default': False, + 'validator': bool, } } @@ -58,15 +64,42 @@ class CustomPanelSample(PanelMixin, SettingsMixin, InvenTreePlugin): ] if self.get_setting('ENABLE_HELLO_WORLD'): + + # We can use template rendering in the raw content + content = """ + Hello world! +
Path | {{ request.path }} |
User | {{ user.username }} |