error retrieving tag

This commit is contained in:
Matthias 2021-11-20 04:00:34 +01:00
parent 9f0882d637
commit 0d44a4cfa5
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 33 additions and 0 deletions

View File

@ -51,3 +51,8 @@ def safe_url(view_name, *args, **kwargs):
return reverse(view_name, args=args, kwargs=kwargs) return reverse(view_name, args=args, kwargs=kwargs)
except: except:
return None return None
@register.simple_tag()
def plugin_errors(*args, **kwargs):
"""Return all plugin errors"""
return djangosettings.INTEGRATION_ERRORS

View File

@ -102,4 +102,32 @@
</table> </table>
</div> </div>
<h4>{% trans "Plugin errors" %}</h4>
<div class='table-responsive'>
<table class='table table-striped table-condensed'>
<thead>
<tr>
<th>{% trans "Stage" %}</th>
<th>{% trans "Name" %}</th>
<th>{% trans "Message" %}</th>
</tr>
</thead>
<tbody>
{% plugin_errors as pl_errors %}
{% for stage, errors in pl_errors.items %}
{% for error_detail in errors %}
{% for name, message in error_detail.items %}
<tr>
<td>{{ stage }}</td>
<td>{{ name }}</td>
<td>{{ message }}</td>
</tr>
{% endfor %}
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
{% endblock %} {% endblock %}