-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
15353 add better script error message (#15441)
* 15353 add better script error message * Simplify _get_script_class() & add docstring --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
- Loading branch information
1 parent
4b2f26a
commit 58da5c1
Showing
4 changed files
with
74 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
{% extends 'extras/script/base.html' %} | ||
{% load i18n %} | ||
|
||
{% block content %} | ||
<code class="h6 my-3 d-block">{{ script_class.filename }}</code> | ||
<pre class="block">{{ script_class.source }}</pre> | ||
|
||
{% if script_class %} | ||
<code class="h6 my-3 d-block">{{ script_class.filename }}</code> | ||
<pre class="block">{{ script_class.source }}</pre> | ||
{% else %} | ||
<p>{% trans "Error loading script" %}.</p> | ||
<pre class="block">{{ script.module.error }}</pre> | ||
{% endif %} | ||
|
||
{% endblock %} |