We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5ba1a08 + d9bf38d commit 4594e2aCopy full SHA for 4594e2a
1 file changed
app/core/settings.py
@@ -269,12 +269,18 @@
269
# Static files (CSS, JavaScript, Images)
270
# https://docs.djangoproject.com/en/5.2/howto/static-files/
271
STATIC_ROOT = BASE_DIR / "static"
272
-STATIC_URL = "static/"
273
274
DEFAULT_STORAGE_BACKEND = env("DJANGO_DEFAULT_STORAGE_BACKEND", default="storages.backends.s3.S3Storage")
275
STATIC_STORAGE_BACKEND = env("DJANGO_STATIC_STORAGE_BACKEND", default="storages.backends.s3.S3Storage")
276
277
STORAGE_BUCKET_NAME = f"pyconkr-backend-{API_STAGE}"
+
278
+STATIC_URL = (
279
+ f"https://{STORAGE_BUCKET_NAME}.s3.amazonaws.com/"
280
+ if STATIC_STORAGE_BACKEND == "storages.backends.s3.S3Storage"
281
+ else "static/"
282
+)
283
284
STORAGE_OPTIONS = (
285
{
286
"bucket_name": STORAGE_BUCKET_NAME,
0 commit comments