chore(api): update to latest storage spec

environments/review-docs-2452-k33wjb/deployments/21262
Marie 2025-06-02 15:45:52 +02:00 zatwierdzone przez petitminion
rodzic 611631213a
commit 5f0414138b
3 zmienionych plików z 11 dodań i 6 usunięć

Wyświetl plik

@ -556,7 +556,15 @@ The path where static files are collected.
""" """
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = env("STATIC_URL", default=FUNKWHALE_URL + "/staticfiles/") STATIC_URL = env("STATIC_URL", default=FUNKWHALE_URL + "/staticfiles/")
DEFAULT_FILE_STORAGE = "funkwhale_api.common.storage.ASCIIFileSystemStorage" STORAGES = {
"default": {
"BACKEND": "funkwhale_api.common.storage.ASCIIFileSystemStorage",
},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}
PROXY_MEDIA = env.bool("PROXY_MEDIA", default=True) PROXY_MEDIA = env.bool("PROXY_MEDIA", default=True)
""" """
@ -655,7 +663,7 @@ if AWS_ACCESS_KEY_ID:
A directory in your S3 bucket where you store files. A directory in your S3 bucket where you store files.
Use this if you plan to share the bucket between services. Use this if you plan to share the bucket between services.
""" """
DEFAULT_FILE_STORAGE = "funkwhale_api.common.storage.ASCIIS3Boto3Storage" STORAGES["default"]["BACKEND"] = "funkwhale_api.common.storage.ASCIIS3Boto3Storage"
# See: # See:

Wyświetl plik

@ -41,10 +41,6 @@ SECRET_KEY = env("DJANGO_SECRET_KEY")
# SESSION_COOKIE_HTTPONLY = True # SESSION_COOKIE_HTTPONLY = True
# SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=True) # SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=True)
# Static Assets
# ------------------------
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
# TEMPLATE CONFIGURATION # TEMPLATE CONFIGURATION
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# See: # See:

Wyświetl plik

@ -0,0 +1 @@
Updated the django-storage specification to the latest version (#2459)