mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-30 01:39:45 +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 %}
|
{% else %}
|
||||||
STATIC_URL = 'https://s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME
|
STATIC_URL = 'https://s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME
|
||||||
STATICFILES_STORAGE = 'config.settings.production.StaticRootS3BotoStorage'
|
STATICFILES_STORAGE = 'config.settings.production.StaticRootS3BotoStorage'
|
||||||
|
|
||||||
# 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
|
||||||
# 'django.contrib.staticfiles'
|
# 'django.contrib.staticfiles'
|
||||||
|
@ -151,15 +150,12 @@ AWS_PRELOAD_METADATA = True
|
||||||
INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS
|
INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if cookiecutter.use_compressor == 'y'-%}
|
{% if cookiecutter.use_compressor == 'y'-%}
|
||||||
|
|
||||||
# COMPRESSOR
|
# COMPRESSOR
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
COMPRESS_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
|
COMPRESS_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
|
||||||
COMPRESS_URL = STATIC_URL
|
COMPRESS_URL = STATIC_URL
|
||||||
COMPRESS_ENABLED = env.bool('COMPRESS_ENABLED', default=True)
|
COMPRESS_ENABLED = env.bool('COMPRESS_ENABLED', default=True)
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|
||||||
# EMAIL
|
# EMAIL
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
DEFAULT_FROM_EMAIL = env('DJANGO_DEFAULT_FROM_EMAIL',
|
DEFAULT_FROM_EMAIL = env('DJANGO_DEFAULT_FROM_EMAIL',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user