Skip to content

Commit af217d0

Browse files
committed
django-storages: upgrade
Currently, the development environment is broken. We haven't noticed this because it fails on creating the `staticfiles.json` file on `--init` and without that the whole environment is broken. By deleting my local volumes I was able to reproduce it. Now, my environment is broken and it does not work without this patch. Note that this commit requires a change in `common/` repository to auto-create the buckets on S3 (MinIO) when called with `--init`. This is required because newer version of django-storages removed support for auto-creation. Closes #8812
1 parent 2377094 commit af217d0

File tree

3 files changed

+1
-24
lines changed

3 files changed

+1
-24
lines changed

docs/dev/install.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,6 @@ Set up your environment
6262

6363
inv docker.up --init # --init is only needed the first time
6464

65-
#. add read permissions to the storage backend:
66-
67-
* go to http://localhost:9000/ (MinIO S3 storage backend)
68-
* login as ``admin`` / ``password``
69-
* click "..." next to the ``static`` bucket name and then "Edit Policy"
70-
* leave "prefix" empty and click "Add" to give "Read Only" access on the ``static`` bucket
71-
* click on the "+" icon on the bottom-right corner, then "Create bucket" with the name ``media``,
72-
hit Enter on the keyboard, and repeat the operation above to give "Read Only" access to it
73-
7465
#. go to http://community.dev.readthedocs.io to access your local instance of Read the Docs.
7566

7667

readthedocs/settings/docker_compose.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ def show_debug_toolbar(request):
167167
S3_STATIC_STORAGE_OVERRIDE_HOSTNAME = 'community.dev.readthedocs.io'
168168
S3_MEDIA_STORAGE_OVERRIDE_HOSTNAME = 'community.dev.readthedocs.io'
169169

170-
AWS_AUTO_CREATE_BUCKET = True
171-
AWS_DEFAULT_ACL = 'public-read'
172-
AWS_BUCKET_ACL = 'public-read'
173170
AWS_S3_ENCRYPTION = False
174171
AWS_S3_SECURE_URLS = False
175172
AWS_S3_USE_SSL = False

requirements/pip.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,7 @@ django-cors-middleware==1.4.0 # pyup: ignore
101101
# User agent parsing - used for analytics purposes
102102
user-agents==2.2.0
103103

104-
105-
# Utilities used to upload build media to cloud storage
106-
# django-storages is pinned to this particular commit because it
107-
# supports generating URLs with other method than GET when using
108-
# private buckets.
109-
#
110-
# Besides, support for the corresponding AWS_BUCKET_ACL and
111-
# AWS_AUTO_CREATE_BUCKET settings have been removed in 1.10. We depend on this
112-
# in our Docker setup. We can upgrade it but we need to add a
113-
# `create_buckets.sh` to be called on `--init` as we used to do for Azurite
114-
# https://github.com/jschneier/django-storages/pull/636
115-
git+https://github.com/jschneier/django-storages@d0f027c98a877f75615cfc42b4d51c038fa41bf6#egg=django-storages[boto3]==1.9.1
104+
django-storages==1.12.3
116105

117106

118107
# Required only in development and linting

0 commit comments

Comments
 (0)