Skip to content

Commit

Permalink
Use a more reliable source of the static files URL (#649)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Clark <[email protected]>
  • Loading branch information
illia-v and chrisclark authored Jul 23, 2024
1 parent 724bbec commit 4b31630
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion explorer/templatetags/vite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

from django import template
from django.conf import settings
from django.contrib.staticfiles.storage import staticfiles_storage
from django.utils.safestring import mark_safe
from explorer import app_settings, get_version

register = template.Library()

VITE_OUTPUT_DIR = f"{settings.STATIC_URL}explorer/"
VITE_OUTPUT_DIR = staticfiles_storage.url("explorer/")
VITE_DEV_DIR = "explorer/src/"
VITE_SERVER_HOST = getattr(settings, "VITE_SERVER_HOST", "localhost")
VITE_SERVER_PORT = getattr(settings, "VITE_SERVER_PORT", "5173")
Expand Down

0 comments on commit 4b31630

Please sign in to comment.