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:

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

Uploaded Source

Built Distribution

django_http_fallback_storage-1.3.3-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.3.3.tar.gz.

File metadata

File hashes

Hashes for django-http-fallback-storage-1.3.3.tar.gz
Algorithm Hash digest
SHA256 29afab63932327eb96f2ee86c3607f58ef9df62a48ddd58f2164c81f6d5e3a0c
MD5 3d1e2b92ce0e28f2196a4677167c46c9
BLAKE2b-256 7cd2d844426235276ed21477246b87e7db11ab104c83b05849671aef7e9fe6cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_http_fallback_storage-1.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 19563ca5b6fd79210292a9a2114053ee7f2905c71b06d8fb36cde461d27a52f3
MD5 042d98b8213de0bf6f628492b0e69a15
BLAKE2b-256 98ad8a1d37d5351fe266e8b4651b10d1b7d7e73be78fee1a52d1c8f6de5d4f13

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