From 83bc9e94f69d1d711fdef94ba3c584b06cb2923c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Sat, 20 Jun 2026 08:37:29 +0200 Subject: [PATCH] fix: admin (and static) under // --- highscore/app/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/highscore/app/settings.py b/highscore/app/settings.py index 44c5bde..2354d1b 100644 --- a/highscore/app/settings.py +++ b/highscore/app/settings.py @@ -118,4 +118,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/6.0/howto/static-files/ -STATIC_URL = "static/" +# STATIC_URL/MEDIA_URL are literal strings; Django never prepends SCRIPT_NAME to +# them, so the prefix must be added manually for the admin assets to load under +# the /scores sub-path. +STATIC_URL = f"{FORCE_SCRIPT_NAME.rstrip('/')}/static/"