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 = 31536000 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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cb841a5975c40cbfc411b76a1b50d1a352366b72c52bf2685cde50db0cf9d23 |
|
MD5 | 097dab1d0e777a97c4cafbef0192635c |
|
BLAKE2b-256 | e6579beac67c4b1d49c33fa0e6684ad1fa31edb3f0e20fb9b4d580233033c81b |
Close
Hashes for django-cached-s3-storage-0.2.1.macosx-10.8-intel.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a4bca5464449dcd64a69bf828fe3a889df712da94122fb2c1c7bffdbb78f4cd |
|
MD5 | dee10be662726a4781a0ba97d9c131de |
|
BLAKE2b-256 | 55e03dd5c13deef2802bc100d4181525656559d4a3945adad12e1517e6e6805f |