media_failure.html 1.9 KB

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