No project description provided
Project description
When the production site uploads folder gets really big you don’t want to rsync everything to your local machine just to fix a few bugs. Only download what is needed, right?
That’s what this storage class does.
Usage
Make sure that you only use this if DEBUG = True
Add the following settings:
DEFAULT_FILE_STORAGE = 'http_fallback_storage.FallbackStorage' FALLBACK_STORAGE_URL = 'http://example.com/media/'
Optionally, configure logging so that it’s easy to see why page loads would be slow when fetching media files. Either of the following snippets should be fine when added to your settings file:
import http_fallback_storage LOGGING = http_fallback_storage.LOGGING
or:
# LOGGING has already been defined import http_fallback_storage LOGGING.update(http_fallback_storage.LOGGING)
Optionally, specify a regular expression for skipping file downloads, e.g. the following regex to never download movies:
FALLBACK_STORAGE_SKIP = r'(\.mp4|\.mov)$'
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
File details
Details for the file django-http-fallback-storage-1.4.tar.gz
.
File metadata
- Download URL: django-http-fallback-storage-1.4.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b8e95f43ef8038caea47e4707caf6c062bfe7b54e90f711a4f2c6deefc14a9b |
|
MD5 | 6292d7625f455b96d852cefe0ec5fd27 |
|
BLAKE2b-256 | 8e5dbf0ea06245b40329e2888257d139b22f34dcf0576282e1496cb0fe12782f |