django-storage-swift
django-storage-swift copied to clipboard
Add CachedStaticSwiftStorage and ManifestStaticSwiftStorage
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
ismyapp/img/background.png
. - The
ManifestStaticSwiftStorage
overridesread_manifest
to handleClientException
which indicates that the manifest doesn't exist (likeIOError
on filesystem).