mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 00:36:11 -06:00
Extend 500 error template to list installed plugins
This commit is contained in:
parent
3597f79235
commit
82180ecf42
@ -11,6 +11,8 @@ from django.views.defaults import ERROR_500_TEMPLATE_NAME, page_not_found
|
|||||||
from django.views.generic import View
|
from django.views.generic import View
|
||||||
from sentry_sdk import capture_message
|
from sentry_sdk import capture_message
|
||||||
|
|
||||||
|
from extras.plugins.utils import get_installed_plugins
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'handler_404',
|
'handler_404',
|
||||||
'handler_500',
|
'handler_500',
|
||||||
@ -53,4 +55,5 @@ def handler_500(request, template_name=ERROR_500_TEMPLATE_NAME):
|
|||||||
'exception': str(type_),
|
'exception': str(type_),
|
||||||
'netbox_version': settings.VERSION,
|
'netbox_version': settings.VERSION,
|
||||||
'python_version': platform.python_version(),
|
'python_version': platform.python_version(),
|
||||||
|
'plugins': get_installed_plugins(),
|
||||||
}))
|
}))
|
||||||
|
@ -30,7 +30,10 @@
|
|||||||
{{ error }}
|
{{ error }}
|
||||||
|
|
||||||
Python version: {{ python_version }}
|
Python version: {{ python_version }}
|
||||||
NetBox version: {{ netbox_version }}</pre>
|
NetBox version: {{ netbox_version }}
|
||||||
|
Plugins: {% for plugin, version in plugins.items %}
|
||||||
|
{{ plugin }}: {{ version }}{% empty %}None installed{% endfor %}
|
||||||
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
If further assistance is required, please post to the <a href="https://github.com/netbox-community/netbox/discussions">NetBox discussion forum</a> on GitHub.
|
If further assistance is required, please post to the <a href="https://github.com/netbox-community/netbox/discussions">NetBox discussion forum</a> on GitHub.
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user