diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 629ee1f31a..d9a9495bbd 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -75,7 +75,6 @@ class InvenTreePluginMixin: panels = [] for plug in registry.with_mixin('panel'): - panels += plug.render_panels(self, self.request) return panels diff --git a/InvenTree/plugin/builtin/integration/mixins.py b/InvenTree/plugin/builtin/integration/mixins.py index 57c9fb3f0a..fbe7e383a9 100644 --- a/InvenTree/plugin/builtin/integration/mixins.py +++ b/InvenTree/plugin/builtin/integration/mixins.py @@ -606,18 +606,18 @@ class PanelMixin: for panel in self.get_custom_panels(view, request): if 'content_template' in panel: - # TODO: Render the actual content + # TODO: Render the actual HTML content from a template file ... if 'javascript_template' in panel: - # TODO: Render the actual content + # TODO: Render the actual javascript content from a template file ... # Check for required keys required_keys = ['title', 'content'] if any([key not in panel for key in required_keys]): - logger.warning(f"Custom panel for plugin '{__class__}' is missing a required key") + logger.warning(f"Custom panel for plugin {__class__} is missing a required parameter") continue # Add some information on this plugin diff --git a/InvenTree/plugin/samples/integration/custom_panel_sample.py b/InvenTree/plugin/samples/integration/custom_panel_sample.py index 3b999cce27..be6567a5fb 100644 --- a/InvenTree/plugin/samples/integration/custom_panel_sample.py +++ b/InvenTree/plugin/samples/integration/custom_panel_sample.py @@ -18,6 +18,19 @@ class CustomPanelSample(PanelMixin, IntegrationPluginBase): PLUGIN_SLUG = "panel" PLUGIN_TITLE = "Custom Panel Example" + def render_location_info(self, loc): + """ + Demonstrate that we can render information particular to a page + """ + return f""" +