summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/uris.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/uris.py b/core/uris.py
index 81f53b6..b55514f 100644
--- a/core/uris.py
+++ b/core/uris.py
@@ -1,3 +1,4 @@
+import sys
from urllib.parse import urljoin
from django.conf import settings
@@ -41,7 +42,15 @@ class StaticAbsoluteUrl(RelativeAbsoluteUrl):
"""
def __init__(self, path: str):
- static_url = staticfiles_storage.url(path)
+ try:
+ static_url = staticfiles_storage.url(path)
+ except ValueError:
+ # Suppress static issues during the first collectstatic
+ # Yes, I know it's a big hack! Pull requests welcome :)
+ if "collectstatic" in sys.argv:
+ super().__init__("https://example.com/")
+ return
+ raise
if "://" in static_url:
super().__init__(static_url)
else: