1. David Larlet
  2. django-storages

Pull requests

#36 Merged
Repository
freakboy3742
Branch
default
Repository
david
Branch
default

Improvements to the Apache Libcloud backend implementation

Author
  1. Russell Keith-Magee
Reviewers
Description

This pull request contains improvements to the Apache Libcloud backend.

  • The current implementation prevents LibCloudStorage from being used as DEFAULT_FILE_STORAGE, because LibCloudStorage has a required argument with no default value. I've added support DEFAULT_LIBCLOUD_PROVIDER setting that defaults to 'default'.

  • I've modified the parsing of LIBCLOUD_PROVIDERS to accept strings, rather than needing to have imports in your settings file just to get at a constant. Old style definitions should continue to work as is.

  • I've corrected the implementation of _save(), which AFAICT, can't have ever worked. _save() must return the saved filename, and the call to upload_object_via_stream requires an iterable, which Django file objects are not by default.

  • I've added documentation for the libcloud backend, including all the new features I've added.

  • I've corrected a number of PEP8 problems, and some typos in docstrings and error messages.

  • Learn about pull requests

Comments (0)