Skip to content

Commit fb6f05d

Browse files
committed
fixup: add staticfiles explicitly
1 parent 43e398e commit fb6f05d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.ci/ansible/settings.py.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ API_ROOT = {{ api_root | repr }}
2929
{% if s3_test | default(false) %}
3030
MEDIA_ROOT = ""
3131
STORAGES = {
32+
"dynaconf_merge": True,
3233
"default": {
3334
"BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
3435
"OPTIONS": {
@@ -52,6 +53,7 @@ S3_USE_SIGV4 = True
5253
{% if azure_test | default(false) %}
5354
MEDIA_ROOT = ""
5455
STORAGES = {
56+
"dynaconf_merge": True,
5557
"default": {
5658
"BACKEND": "storages.backends.azure_storage.AzureStorage",
5759
"OPTIONS": {
@@ -69,6 +71,7 @@ STORAGES = {
6971

7072
{% if gcp_test | default(false) %}
7173
STORAGES = {
74+
"dynaconf_merge": True,
7275
"default": {
7376
"BACKEND": "storages.backends.gcloud.GoogleCloudStorage",
7477
"OPTIONS": {

pulpcore/app/settings.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,14 @@
5656
STATIC_URL = "/assets/"
5757
STATIC_ROOT = DEPLOY_ROOT / STATIC_URL.strip("/")
5858

59-
STORAGES = {"default": {"BACKEND": "pulpcore.app.models.storage.FileSystem"}}
59+
STORAGES = {
60+
"default": {"BACKEND": "pulpcore.app.models.storage.FileSystem"},
61+
"staticfiles": {
62+
# This is django's default, but when customizing STORAGES we need to add explicitly
63+
# https://docs.djangoproject.com/en/4.2/ref/settings/#storages
64+
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
65+
},
66+
}
6067

6168
REDIRECT_TO_OBJECT_STORAGE = True
6269

0 commit comments

Comments
 (0)