django-storage-swift icon indicating copy to clipboard operation
django-storage-swift copied to clipboard

Add CachedStaticSwiftStorage and ManifestStaticSwiftStorage

Open leo-naeka opened this issue 7 years ago • 0 comments

This pull request adds both CachedStaticSwiftStorage and ManifestStaticSwiftStorage, based on django.contrib.staticfiles equivalents : CachedStaticFilesStorage and ManifestStaticFilesStorage.

There's not much code added, it mainly relies on staticfiles' mixins, but there's 2 notable changes:

  • It normalizes the path, because some path may be relative and swift evaluates paths as a whole, nor like a filesystem where myapp/css/../img/background.png is myapp/img/background.png.
  • The ManifestStaticSwiftStorage overrides read_manifest to handle ClientException which indicates that the manifest doesn't exist (like IOError on filesystem).

leo-naeka avatar Nov 28 '17 15:11 leo-naeka