mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-08 13:00:08 -06:00
Closes #21071: Include the request method & URL when displaying a server error
This commit is contained in:
@@ -52,6 +52,7 @@ def handler_500(request, template_name=ERROR_500_TEMPLATE_NAME):
|
|||||||
type_, error = sys.exc_info()[:2]
|
type_, error = sys.exc_info()[:2]
|
||||||
|
|
||||||
return HttpResponseServerError(template.render({
|
return HttpResponseServerError(template.render({
|
||||||
|
'request': request,
|
||||||
'error': error,
|
'error': error,
|
||||||
'exception': str(type_),
|
'exception': str(type_),
|
||||||
'netbox_version': settings.RELEASE.full_version,
|
'netbox_version': settings.RELEASE.full_version,
|
||||||
|
|||||||
@@ -35,6 +35,12 @@
|
|||||||
{% trans "Plugins" %}: {% for plugin, version in plugins.items %}
|
{% trans "Plugins" %}: {% for plugin, version in plugins.items %}
|
||||||
{{ plugin }}: {{ version }}{% empty %}{% trans "None installed" %}{% endfor %}
|
{{ plugin }}: {{ version }}{% empty %}{% trans "None installed" %}{% endfor %}
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>
|
||||||
|
{% trans "The request which yielded the above error is shown below:" %}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<code>{{ request.method }} {{ request.build_absolute_uri }}</code>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{% trans "If further assistance is required, please post to the" %} <a href="https://github.com/netbox-community/netbox/discussions">{% trans "NetBox discussion forum" %}</a> {% trans "on GitHub" %}.
|
{% trans "If further assistance is required, please post to the" %} <a href="https://github.com/netbox-community/netbox/discussions">{% trans "NetBox discussion forum" %}</a> {% trans "on GitHub" %}.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user