fix: admin (and static) under /<force_script_name>/

This commit is contained in:
Loïc Gremaud 2026-06-20 08:37:29 +02:00
parent 6ad86af568
commit 83bc9e94f6
Signed by: Legrems
GPG Key ID: D4620E6DF3E0121D

View File

@ -118,4 +118,7 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/6.0/howto/static-files/ # 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/"