From 0d44a4cfa5cb9b4a34c7c1e7541809ca75145715 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 20 Nov 2021 04:00:34 +0100 Subject: [PATCH] error retrieving tag --- .../plugin/templatetags/plugin_extras.py | 5 ++++ .../templates/InvenTree/settings/plugin.html | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/InvenTree/plugin/templatetags/plugin_extras.py b/InvenTree/plugin/templatetags/plugin_extras.py index 05ba26d09d..e18ef70b3c 100644 --- a/InvenTree/plugin/templatetags/plugin_extras.py +++ b/InvenTree/plugin/templatetags/plugin_extras.py @@ -51,3 +51,8 @@ def safe_url(view_name, *args, **kwargs): return reverse(view_name, args=args, kwargs=kwargs) except: return None + +@register.simple_tag() +def plugin_errors(*args, **kwargs): + """Return all plugin errors""" + return djangosettings.INTEGRATION_ERRORS diff --git a/InvenTree/templates/InvenTree/settings/plugin.html b/InvenTree/templates/InvenTree/settings/plugin.html index 920d0b7804..e5bf97a512 100644 --- a/InvenTree/templates/InvenTree/settings/plugin.html +++ b/InvenTree/templates/InvenTree/settings/plugin.html @@ -102,4 +102,32 @@ + +

{% trans "Plugin errors" %}

+
+ + + + + + + + + + + {% plugin_errors as pl_errors %} + {% for stage, errors in pl_errors.items %} + {% for error_detail in errors %} + {% for name, message in error_detail.items %} + + + + + + {% endfor %} + {% endfor %} + {% endfor %} + +
{% trans "Stage" %}{% trans "Name" %}{% trans "Message" %}
{{ stage }}{{ name }}{{ message }}
+
{% endblock %}