Django storage backend to be used with S3.
Project description
This package contains a CachedS3BotoStorage to be used with django-compressor and S3.
Code copied from https://github.com/jezdez/django_compressor/issues/100.
Example settings:
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' STATICFILES_STORAGE = 'cached_s3_storage.CachedS3BotoStorage' COMPRESS_STORAGE = STATICFILES_STORAGE AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME'] AWS_PRELOAD_METADATA = True AWS_IS_GZIPPED = True AWS_QUERYSTRING_AUTH = False from django.utils.http import http_date from time import time max_age = 315360000 AWS_HEADERS = { 'x-amz-acl': 'public-read', 'Expires': http_date(time() + max_age), 'Cache-Control': 'public, max-age=' + str(max_age) }
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-cached-s3-storage-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4916685ac27b53fb2f78740cb3ca0fed002d6923ce7f1bd8295972d422dd6c3 |
|
MD5 | 3dbbf347efd84d5a9546f0b0b415528b |
|
BLAKE2b-256 | 6992436a80db0930dea7aef50c61b743d213bb7411395b1efef5cc0db5d8c54c |
Close
Hashes for django-cached-s3-storage-0.2.macosx-10.5-intel.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318cfe3e43a76551443232d597ffa0cfba0f0de1bac88dfa8121492e0dc778e4 |
|
MD5 | b4dc685c65835576eead9c8d05e8393e |
|
BLAKE2b-256 | 4b439b3eefd1a0be0294d6b9c8d25fe301ba51b8761908575ee574d13026720e |