mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-29 17:29:45 +03:00
#342 Add required options for S3 to production.py and added Env variable to enable/disable compression
This commit is contained in:
parent
feddb94eb7
commit
a9fc0a919c
|
@ -150,6 +150,15 @@ STATICFILES_STORAGE = 'config.settings.production.StaticRootS3BotoStorage'
|
|||
AWS_PRELOAD_METADATA = True
|
||||
INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS
|
||||
{%- endif %}
|
||||
{% if cookiecutter.use_compressor == 'y'-%}
|
||||
|
||||
# COMPRESSOR
|
||||
# ------------------------------------------------------------------------------
|
||||
COMPRESS_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
|
||||
COMPRESS_URL = STATIC_URL
|
||||
COMPRESS_ENABLED = env.bool('COMPRESS_ENABLED', default=True)
|
||||
{%- endif %}
|
||||
|
||||
|
||||
# EMAIL
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -24,3 +24,6 @@ DJANGO_OPBEAT_ORGANIZATION_ID
|
|||
DJANGO_OPBEAT_APP_ID
|
||||
DJANGO_OPBEAT_SECRET_TOKEN
|
||||
{% endif %}
|
||||
{% if cookiecutter.use_compressor == 'y' -%}
|
||||
COMPRESS_ENABLED=
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user