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.6.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

django_http_fallback_storage-1.6-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-http-fallback-storage-1.6.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for django-http-fallback-storage-1.6.tar.gz
Algorithm Hash digest
SHA256 70712ae8af9b94f86fe4b4a60a1653ffe24349792434c6553f48663a7f4764b2
MD5 ef710c0a547d336a23fd67cfee5b798d
BLAKE2b-256 61df1ec30e48f104c50016598afaf3ed33252a406aef0aefa95f348cccf13133

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_http_fallback_storage-1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for django_http_fallback_storage-1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c33a5be0c9223a2397e3b4fd7578a3595b427a2dfcd7474f020d3b7bdcbc6f73
MD5 b8935015ee0c9faf07e034cc33c7bf9f
BLAKE2b-256 4eebeb0a6966cbb79faf54679081babf45d5638a7b2aa4a3d03a448f4722ae09

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