mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-29 01:09:50 +03:00
#342 Add required options for compressor on S3 to production.py
This commit is contained in:
parent
a9fc0a919c
commit
dc6ae726ef
|
@ -143,7 +143,6 @@ STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
|||
{% else %}
|
||||
STATIC_URL = 'https://s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME
|
||||
STATICFILES_STORAGE = 'config.settings.production.StaticRootS3BotoStorage'
|
||||
|
||||
# See: https://github.com/antonagestam/collectfast
|
||||
# For Django 1.7+, 'collectfast' should come before
|
||||
# 'django.contrib.staticfiles'
|
||||
|
@ -151,15 +150,12 @@ 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
|
||||
# ------------------------------------------------------------------------------
|
||||
DEFAULT_FROM_EMAIL = env('DJANGO_DEFAULT_FROM_EMAIL',
|
||||
|
|
Loading…
Reference in New Issue
Block a user