mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 13:14:28 +03:00
Make sure that STATIC_URL != MEDIA_URL
This commit is contained in:
parent
1d731ae48a
commit
b368dd7e36
|
@ -119,7 +119,11 @@ AWS_HEADERS = {
|
||||||
|
|
||||||
# URL that handles the media served from MEDIA_ROOT, used for managing
|
# URL that handles the media served from MEDIA_ROOT, used for managing
|
||||||
# stored files.
|
# stored files.
|
||||||
|
{% if cookiecutter.use_whitenoise == 'y' -%}
|
||||||
MEDIA_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME
|
MEDIA_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME
|
||||||
|
{% else %}
|
||||||
|
MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
# Static Assets
|
# Static Assets
|
||||||
# ------------------------
|
# ------------------------
|
||||||
|
@ -127,7 +131,7 @@ MEDIA_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME
|
||||||
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
|
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
|
||||||
{% else %}
|
{% else %}
|
||||||
STATICFILES_STORAGE = DEFAULT_FILE_STORAGE
|
STATICFILES_STORAGE = DEFAULT_FILE_STORAGE
|
||||||
STATIC_URL = MEDIA_URL
|
STATIC_URL = 'https://s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME
|
||||||
|
|
||||||
# See: https://github.com/antonagestam/collectfast
|
# See: https://github.com/antonagestam/collectfast
|
||||||
# For Django 1.7+, 'collectfast' should come before
|
# For Django 1.7+, 'collectfast' should come before
|
||||||
|
|
Loading…
Reference in New Issue
Block a user