Skip to main content

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

  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)$'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-http-fallback-storage-1.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

django_http_fallback_storage-1.5-py2.py3-none-any.whl (4.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-http-fallback-storage-1.5.tar.gz.

File metadata

  • Download URL: django-http-fallback-storage-1.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for django-http-fallback-storage-1.5.tar.gz
Algorithm Hash digest
SHA256 162e1af92151aeef23da9c50ec2a8934b1f76600f564d2a549d20f5ccfedf205
MD5 83fac031b26b0bc3c1d4d40ac6c71e6f
BLAKE2b-256 cef0da7160e9a30ce950e2ce5daa6b5b1c15ffa3521ca4763caffb833f4911f1

See more details on using hashes here.

File details

Details for the file django_http_fallback_storage-1.5-py2.py3-none-any.whl.

File metadata

  • Download URL: django_http_fallback_storage-1.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for django_http_fallback_storage-1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a922b53f78e4faae7a1978e135cbd34c68c8ee564bab66f14a6b04fa645c904e
MD5 075238f9dc2c0ec0eeace5608d84e40b
BLAKE2b-256 2935e9471b71bc076157bcd62f7d50a0dcd1b4c6849f22c83cebbfb4cfa3cd4d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page