Skip to content

Commit 4b31630

Browse files
illia-vchrisclark
andauthored
Use a more reliable source of the static files URL (#649)
Co-authored-by: Chris Clark <chris@untrod.com>
1 parent 724bbec commit 4b31630

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

explorer/templatetags/vite.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
from django import template
44
from django.conf import settings
5+
from django.contrib.staticfiles.storage import staticfiles_storage
56
from django.utils.safestring import mark_safe
67
from explorer import app_settings, get_version
78

89
register = template.Library()
910

10-
VITE_OUTPUT_DIR = f"{settings.STATIC_URL}explorer/"
11+
VITE_OUTPUT_DIR = staticfiles_storage.url("explorer/")
1112
VITE_DEV_DIR = "explorer/src/"
1213
VITE_SERVER_HOST = getattr(settings, "VITE_SERVER_HOST", "localhost")
1314
VITE_SERVER_PORT = getattr(settings, "VITE_SERVER_PORT", "5173")

0 commit comments

Comments
 (0)