This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

django-localdevstorage is a set of storage backends that helps during development. Instead of having to copy all user generated media from the live site for local development, the storage backends provided by django-localdevstorage will download media files that are not available locally “on demand”.

Installation

Set one of the provided storage backends in your settings.py. These are:

  • HTTP: DEFAULT_FILE_STORAGE = 'localdevstorage.http.HttpStorage'
  • (more will follow)

Note

If you use django-filer 0.9 or higher, you have to make sure that localdevstorage is not used as the thumbnail storage, e.g. by adding this to your settings:

FILER_STORAGES = {
    'public': {
        'thumbnails': {
            'ENGINE': 'django.core.files.storage.FileSystemStorage',
            'OPTIONS': {},
            'THUMBNAIL_OPTIONS': {
                'base_dir': 'filer_public_thumbnails',
            },
        },
    },
}

HTTP

Set the fallback domain that should be used to fetch missing files. This is usually the protocol (http or https) and the domain your live site:

LOCALDEVSTORAGE_HTTP_FALLBACK_DOMAIN = 'http://www.example.com/'

Note

Earlier versions of this library used LOCALDEVSTORAGE_HTTP_FALLBACK_URL. While this still works, it is recommended to update your settings to the new name. LOCALDEVSTORAGE_HTTP_FALLBACK_URL will be removed in a future version.

If your server is secured with HTTP basic auth, you can provide a username and password:

LOCALDEVSTORAGE_HTTP_USERNAME = 'foo'
LOCALDEVSTORAGE_HTTP_PASSWORD = 'bar'

SFTP

There are three settings that need to be configured for the SFTP backend:

  • LOCALDEVSTORAGE_SFTP_USER
  • LOCALDEVSTORAGE_SFTP_HOST
  • LOCALDEVSTORAGE_SFTP_ROOT_PATH: this should be the MEDIA_ROOT on the remote machine in most cases.

Note

  • The SFTP backend is much slower than the HTTP backend, which you should use in most cases. The SFTP backend is only really useful if your media files are not directly accessible through unauthenticated HTTP.
  • because the SFTP backend can’t prompt for a password, make sure that a connection can be established through public key exchange.

Warning

Although we took special care not to do anything destructive on the remote machine, bugs in our code or in upstream libraries can always happen. This alone should be reason enough to use the HTTP backend in almost all cases, since it is, by definition, read only.

Caveats

  • Since django-localdevstorage extends a Django storage backend (FileSystemStorage to be precise), only code that uses Django’s file storage abstraction works with django-localdevstorage. Code that bypasses Django and accesses files directly will not benefit.
Release History

Release History

0.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_localdevstorage-0.5-py2.py3-none-any.whl (7.7 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel May 5, 2015
django-localdevstorage-0.5.tar.gz (7.3 kB) Copy SHA256 Checksum SHA256 Source May 5, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting