Skip to main content

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)
}

Release files for django-cached-s3-storage 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-cached-s3-storage 0.2.1
File Size Uploaded
django-cached-s3-storage-0.2.1.tar.gz 1.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-cached-s3-storage 0.2.1
File Interpreter ABI Platform
django-cached-s3-storage-0.2.1.macosx-10.8-intel.exe Details

Total release size: 66.7 kB

Release files / django-cached-s3-storage-0.2.1.tar.gz

Download URL django-cached-s3-storage-0.2.1.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7cb841a5975c40cbfc411b76a1b50d1a352366b72c52bf2685cde50db0cf9d23
BLAKE2b-256 checksum
How to use checksums
e6579beac67c4b1d49c33fa0e6684ad1fa31edb3f0e20fb9b4d580233033c81b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django-cached-s3-storage-0.2.1.macosx-10.8-intel.exe

Download URL django-cached-s3-storage-0.2.1.macosx-10.8-intel.exe
Size 64.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6a4bca5464449dcd64a69bf828fe3a889df712da94122fb2c1c7bffdbb78f4cd
BLAKE2b-256 checksum
How to use checksums
55e03dd5c13deef2802bc100d4181525656559d4a3945adad12e1517e6e6805f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page