Add "exists" method to StaticManifestMixin#14
Add "exists" method to StaticManifestMixin#14ryanbagwell wants to merge 2 commits intohzdg:masterfrom
Conversation
…with the proposed storage name exists instead of the local storage name
|
I'm not 100% clear on what this is for, but I think this might be conflating what the storage object is calling "names" and URLs, which don't necessarily correspond to the names used by other storage objects. Also, the job of the StaticManifestMixin is super-limited: it's just supposed to look up URLs using the static manifest, so if it has an def exists(self, name):
if not settings.ECSTATIC_USE_MANIFEST:
return super(StaticManifestMixin, self).exists(name)
try:
staticfiles_manifest.get(name)
return True
except NotInManifest:
return FalseI think this would accomplish what you want, but we'll have to test it a bunch before merging to make sure nothing else is depending on the underlying exists method. |
|
I see what you're saying, but that only checks if the file is listed in the manifest, not that it actually exists on the remote storage object. I think you still want to call super(StaticManifestMixin, self).url(name) after getting the name listed in the manifest. |
so it checks the remote storage for the name of the remotely stored file instead of the locally stored file.