Skip to content

Commit 3eb2a12

Browse files
committed
Update README.md
1 parent 07b6f90 commit 3eb2a12

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,26 +171,23 @@ Use Cloudflare R2, a global object storage service, as your Django storage backe
171171
```
172172
173173
2. **Django Settings (`settings.py`):**
174-
```python
174+
```python
175+
MEDIA_URL = 'https://pub-xxxxx.r2.dev/'
176+
175177
STORAGES = {
176178
"default": {
177179
"BACKEND": "django_cf.storage.R2Storage",
178180
"OPTIONS": {
179181
# The binding name must match the one in wrangler.jsonc
180182
"binding": "BUCKET",
181183
# Optional: prefix for all files
182-
"location": "",
184+
"location": "media",
183185
# Optional: allow overwriting existing files (default: False)
184186
"allow_overwrite": False,
185187
}
186188
},
187-
# Optional: separate storage for static files
188189
"staticfiles": {
189-
"BACKEND": "django_cf.storage.R2Storage",
190-
"OPTIONS": {
191-
"binding": "BUCKET",
192-
"location": "static",
193-
}
190+
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
194191
},
195192
}
196193
```

0 commit comments

Comments
 (0)