It seems the only way to do this right now is to create a custom mixin
[https://github.com/klis87/django-cloudinary-
storage/blob/711af26702645dc42f2a3e59d69e37e690def0bf/cloudinary_storage/storage.py#L199
like this one] and override read_manifest and save_manifest to use a
custom storage.
It seems the current behavior can be retained by using a FileSystemStorage
with location = settings.STATIC_ROOT (aka self). Can we add a
manifest_storage as an overridable property?
--
Ticket URL: <https://code.djangoproject.com/ticket/27541>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* component: Uncategorized => contrib.staticfiles
* type: Uncategorized => New feature
--
Ticket URL: <https://code.djangoproject.com/ticket/27541#comment:1>
Comment (by Tim Graham):
I'm not sure if I understand the suggestion, can you provide a patch? Will
it be backwards compatible?
--
Ticket URL: <https://code.djangoproject.com/ticket/27541#comment:2>
* Attachment "manifest_storage.patch" added.
manifest_storage indirection
Comment (by Ryan Lopopolo):
My intent is to add a layer of indirection to allow the manifest file to
be saved to a separate storage backend than the static files themselves.
I've attached a patch. It should be backwards compatible.
--
Ticket URL: <https://code.djangoproject.com/ticket/27541#comment:3>
* Attachment "manifest_storage.patch" added.
manifest_storage indirection
--
* Attachment "manifest_storage.patch" added.
manifest_storage indirection
--
Comment (by Ryan Lopopolo):
The latest patch passes all tests when running
../venv/bin/python ./runtests.py staticfiles_tests.test_storage
I could not get the whole staticfiles suite to run
--
Ticket URL: <https://code.djangoproject.com/ticket/27541#comment:4>
* needs_docs: 0 => 1
* has_patch: 0 => 1
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted
Comment:
It might be fine, I've not done much work with that code to say if there
might be a better design. Anyway, at least docs and tests are also needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/27541#comment:5>
Comment (by Carlton Gibson):
I'm going to close this as a duplicate of #27590 — both tickets are asking
to allow configuration of where to store the manifest.
--
Ticket URL: <https://code.djangoproject.com/ticket/27541#comment:6>
* status: new => closed
* resolution: => duplicate
Comment:
Duplicate of #27590.
--
Ticket URL: <https://code.djangoproject.com/ticket/27541#comment:7>