From 9a795fe66cbae78c8109344dd821fafbc8ff8797 Mon Sep 17 00:00:00 2001 From: Donghoon Nam <54799053+codenamenam@users.noreply.github.com> Date: Thu, 11 Sep 2025 17:33:34 +0900 Subject: [PATCH] Enable collectfasta for Azure storage (#6052) --- {{cookiecutter.project_slug}}/config/settings/production.py | 3 ++- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 8ef7b57c8..1981be38f 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -205,6 +205,7 @@ STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/" {%- elif cookiecutter.cloud_provider == 'Azure' %} MEDIA_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/media/" {%- if cookiecutter.use_whitenoise == 'n' %} +COLLECTFASTA_STRATEGY = "collectfasta.strategies.azure.AzureBlobStrategy" STATIC_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/static/" {%- endif %} {%- endif %} @@ -324,7 +325,7 @@ COMPRESS_FILTERS = { "js": ["compressor.filters.jsmin.JSMinFilter"], } {% endif %} -{%- if cookiecutter.use_whitenoise == 'n' and cookiecutter.cloud_provider in ('AWS', 'GCP') -%} +{%- if cookiecutter.use_whitenoise == 'n' and cookiecutter.cloud_provider in ('AWS', 'GCP', 'Azure') -%} # Collectfasta # ------------------------------------------------------------------------------ # https://github.com/jasongi/collectfasta#installation diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index e6bf55e1e..0c7c236b0 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -4,7 +4,7 @@ gunicorn==23.0.0 # https://github.com/benoitc/gunicorn psycopg[c]==3.2.10 # https://github.com/psycopg/psycopg -{%- if cookiecutter.use_whitenoise == 'n'and cookiecutter.cloud_provider in ('AWS', 'GCP') %} +{%- if cookiecutter.use_whitenoise == 'n'and cookiecutter.cloud_provider in ('AWS', 'GCP', 'Azure') %} Collectfasta==3.3.1 # https://github.com/jasongi/collectfasta {%- endif %} {%- if cookiecutter.use_sentry == "y" %}