media_failure.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {% load static %}
  2. {% load i18n %}
  3. <!DOCTYPE html>
  4. <html lang="en">
  5. <head>
  6. <title>{% trans "Static Media Failure - NetBox" %}</title>
  7. <meta charset="UTF-8">
  8. <style type="text/css">
  9. body {
  10. font-family: sans-serif;
  11. }
  12. li.tip {
  13. line-height: 150%;
  14. margin-bottom: 30px;
  15. }
  16. </style>
  17. </head>
  18. <body>
  19. <div style="margin: auto; width: 800px">
  20. <h1>{% trans "Static Media Failure" %}</h1>
  21. <h3>
  22. {% trans "The following static media file failed to load" %}:
  23. <a href="{% static filename %}"><code style="color: red">{{ filename }}</code></a>
  24. </h3>
  25. <p>{% trans "Check the following" %}:</p>
  26. <ul>
  27. <li class="tip">
  28. {% blocktrans trimmed with command="manage.py collectstatic" %}
  29. <code>{{ command }}</code> was run during the most recent upgrade. This installs the most
  30. recent iteration of each static file into the static root path.
  31. {% endblocktrans %}
  32. </li>
  33. <li class="tip">
  34. {% blocktrans trimmed with docs_url="https://docs.netbox.dev/en/stable/installation/" %}
  35. The HTTP service (e.g. nginx or Apache) is configured to serve files from the <code>STATIC_ROOT</code>
  36. path. Refer to <a href="{{ docs_url }}">the installation documentation</a> for further guidance.
  37. {% endblocktrans %}
  38. <ul>
  39. {% if request.user.is_superuser %}
  40. <li><code>STATIC_ROOT: <strong>{{ settings.STATIC_ROOT }}</strong></code></li>
  41. {% endif %}
  42. <li><code>STATIC_URL: <strong>{{ settings.STATIC_URL }}</strong></code></li>
  43. </ul>
  44. </li>
  45. <li class="tip">
  46. {% blocktrans trimmed %}
  47. The file <code>{{ filename }}</code> exists in the static root directory and is readable by the HTTP
  48. server.
  49. {% endblocktrans %}
  50. </li>
  51. </ul>
  52. <p>
  53. {% url 'home' as home_url %}
  54. {% blocktrans trimmed %}
  55. Click <a href="{{ home_url }}">here</a> to attempt loading NetBox again.
  56. {% endblocktrans %}
  57. </p>
  58. </div>
  59. </body>
  60. </html>