Skip to main content

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

  1. Make sure that you only use this if DEBUG = True

  2. Add the following settings:

    DEFAULT_FILE_STORAGE = 'http_fallback_storage.FallbackStorage'
    FALLBACK_STORAGE_URL = 'http://example.com/media/'
  3. 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:

    FALLBACK_STORAGE_LOGGING = True
    
    import http_fallback_storage
    LOGGING = http_fallback_storage.LOGGING

    or:

    FALLBACK_STORAGE_LOGGING = True
    
    # LOGGING has already been defined
    import http_fallback_storage
    LOGGING.update(http_fallback_storage.LOGGING)
  4. Optionally, specify a regular expression for skipping file downloads, e.g. the following regex to never download movies:

    FALLBACK_STORAGE_SKIP = r'(\.mp4|\.mov)$'

Release files for django-http-fallback-storage 1.6

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-http-fallback-storage 1.6
File Size Uploaded
django-http-fallback-storage-1.6.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-http-fallback-storage 1.6
File Interpreter ABI Platform
django_http_fallback_storage-1.6-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 8.5 kB

Release files / django-http-fallback-storage-1.6.tar.gz

Download URL django-http-fallback-storage-1.6.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
70712ae8af9b94f86fe4b4a60a1653ffe24349792434c6553f48663a7f4764b2
BLAKE2b-256 checksum
How to use checksums
61df1ec30e48f104c50016598afaf3ed33252a406aef0aefa95f348cccf13133
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.8

Release files / django_http_fallback_storage-1.6-py2.py3-none-any.whl

Download URL django_http_fallback_storage-1.6-py2.py3-none-any.whl
Size 4.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c33a5be0c9223a2397e3b4fd7578a3595b427a2dfcd7474f020d3b7bdcbc6f73
BLAKE2b-256 checksum
How to use checksums
4eebeb0a6966cbb79faf54679081babf45d5638a7b2aa4a3d03a448f4722ae09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.6 This release

2 release files

1.5

2 release files

1.4

1 release file

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2

2 release files

1.1

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

2 release files

0.1

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