From 69f1b3168ac3f29fc4bafba0418769248b10062a Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 15 Dec 2022 00:35:04 -0700 Subject: Improve cacheability --- core/uris.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/uris.py') diff --git a/core/uris.py b/core/uris.py index 2800fd4..81f53b6 100644 --- a/core/uris.py +++ b/core/uris.py @@ -1,7 +1,7 @@ from urllib.parse import urljoin from django.conf import settings -from django.templatetags.static import static +from django.contrib.staticfiles.storage import staticfiles_storage class RelativeAbsoluteUrl: @@ -41,7 +41,7 @@ class StaticAbsoluteUrl(RelativeAbsoluteUrl): """ def __init__(self, path: str): - static_url = static(path) + static_url = staticfiles_storage.url(path) if "://" in static_url: super().__init__(static_url) else: -- cgit v1.2.3