mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 08:14:13 +03:00
If using whitenoise disable AWS and GCE for static
If using whitenoise disable AWS and GCE for static setting.
This commit is contained in:
parent
e74e2a8ad3
commit
570930ef13
|
@ -99,11 +99,10 @@ GS_DEFAULT_ACL = "publicRead"
|
||||||
# ------------------------
|
# ------------------------
|
||||||
{% if cookiecutter.use_whitenoise == 'y' -%}
|
{% if cookiecutter.use_whitenoise == 'y' -%}
|
||||||
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
||||||
{%- endif -%}
|
{%- elif cookiecutter.cloud_provider == 'AWS' and cookiecutter.use_whitenoise == 'n' %}
|
||||||
{%- if cookiecutter.cloud_provider == 'AWS' %}
|
|
||||||
STATICFILES_STORAGE = "config.settings.production.StaticRootS3Boto3Storage"
|
STATICFILES_STORAGE = "config.settings.production.StaticRootS3Boto3Storage"
|
||||||
STATIC_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/static/"
|
STATIC_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/static/"
|
||||||
{%- elif cookiecutter.cloud_provider == 'GCE' %}
|
{%- elif cookiecutter.cloud_provider == 'GCE' and cookiecutter.use_whitenoise == 'n' %}
|
||||||
STATIC_URL = "https://storage.googleapis.com/{}/static/".format(GS_BUCKET_NAME)
|
STATIC_URL = "https://storage.googleapis.com/{}/static/".format(GS_BUCKET_NAME)
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user