static to Amazon #2

This commit is contained in:
Kuroshini 2019-11-25 14:26:37 +03:00
parent 49c6dc8f1d
commit a660ffcc31
2 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,7 @@ AWS_S3_OBJECT_PARAMETERS = {'CacheControl': 'max-age=86400'}
AWS_S3_ADDRESSING_STYLE = 'path'
# Static settings
PUBLIC_STATIC_LOCATION = 'static'
PUBLIC_STATIC_LOCATION = 'static-dev'
STATIC_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/{PUBLIC_STATIC_LOCATION}/'
STATICFILES_STORAGE = 'project.storage_backends.PublicStaticStorage'

View File

@ -4,6 +4,11 @@ from .amazon_s3 import *
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
PUBLIC_STATIC_LOCATION = 'static'
STATIC_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/{PUBLIC_STATIC_LOCATION}/'
STATICFILES_STORAGE = 'project.storage_backends.PublicStaticStorage'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False