diff options
Diffstat (limited to 'config/settings/base.py')
-rw-r--r-- | config/settings/base.py | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/config/settings/base.py b/config/settings/base.py index 9414953..09a748f 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -317,36 +317,36 @@ SOCIALACCOUNT_FORMS = {"signup": "pyblackbird_cc.users.forms.UserSocialSignupFor # STORAGES # ------------------------------------------------------------------------------ -# # https://django-storages.readthedocs.io/en/latest/#installation -# INSTALLED_APPS += ["storages"] -# # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings -# # AWS_ACCESS_KEY_ID = env("DJANGO_AWS_ACCESS_KEY_ID") -# AWS_ACCESS_KEY_ID = env("SPACES_KEY") -# # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings -# # AWS_SECRET_ACCESS_KEY = env("DJANGO_AWS_SECRET_ACCESS_KEY") -# AWS_SECRET_ACCESS_KEY = env("SPACES_SECRET") -# # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings -# # AWS_STORAGE_BUCKET_NAME = env("DJANGO_AWS_STORAGE_BUCKET_NAME") -# AWS_STORAGE_BUCKET_NAME = env("SPACES_BUCKET_NAME") -# # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings -# AWS_QUERYSTRING_AUTH = False -# # DO NOT change these unless you know what you're doing. -# _AWS_EXPIRY = 60 * 60 * 24 * 7 -# # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings -# AWS_S3_OBJECT_PARAMETERS = { -# "CacheControl": f"max-age={_AWS_EXPIRY}, s-maxage={_AWS_EXPIRY}, must-revalidate", -# } -# # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings -# AWS_S3_MAX_MEMORY_SIZE = env.int( -# "DJANGO_AWS_S3_MAX_MEMORY_SIZE", -# default=100_000_000, # 100MB -# ) -# # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings -# AWS_S3_REGION_NAME = env("DJANGO_AWS_S3_REGION_NAME", default=None) -# # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#cloudfront -# AWS_S3_CUSTOM_DOMAIN = env("DJANGO_AWS_S3_CUSTOM_DOMAIN", default=None) -# aws_s3_domain = AWS_S3_CUSTOM_DOMAIN or f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com" -# AWS_S3_ENDPOINT_URL = env("SPACES_ENDPOINT_URL") +# https://django-storages.readthedocs.io/en/latest/#installation +INSTALLED_APPS += ["storages"] +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings +# AWS_ACCESS_KEY_ID = env("DJANGO_AWS_ACCESS_KEY_ID") +AWS_ACCESS_KEY_ID = env("SPACES_KEY") +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings +# AWS_SECRET_ACCESS_KEY = env("DJANGO_AWS_SECRET_ACCESS_KEY") +AWS_SECRET_ACCESS_KEY = env("SPACES_SECRET") +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings +# AWS_STORAGE_BUCKET_NAME = env("DJANGO_AWS_STORAGE_BUCKET_NAME") +AWS_STORAGE_BUCKET_NAME = env("SPACES_BUCKET_NAME") +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings +AWS_QUERYSTRING_AUTH = False +# DO NOT change these unless you know what you're doing. +_AWS_EXPIRY = 60 * 60 * 24 * 7 +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings +AWS_S3_OBJECT_PARAMETERS = { + "CacheControl": f"max-age={_AWS_EXPIRY}, s-maxage={_AWS_EXPIRY}, must-revalidate", +} +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings +AWS_S3_MAX_MEMORY_SIZE = env.int( + "DJANGO_AWS_S3_MAX_MEMORY_SIZE", + default=100_000_000, # 100MB +) +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings +AWS_S3_REGION_NAME = env("DJANGO_AWS_S3_REGION_NAME", default=None) +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#cloudfront +AWS_S3_CUSTOM_DOMAIN = env("DJANGO_AWS_S3_CUSTOM_DOMAIN", default=None) +aws_s3_domain = AWS_S3_CUSTOM_DOMAIN or f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com" +AWS_S3_ENDPOINT_URL = env("STATIC_ENDPOINT_URL") # Your stuff... # ------------------------------------------------------------------------------ |