Compatibility with an external file storage separated in pub/ and priv/

This commit is contained in:
Raphael Michel
2018-03-20 09:32:20 +01:00
parent 511cdbbfe2
commit 840cee206a
7 changed files with 14 additions and 11 deletions

View File

@@ -29,7 +29,7 @@ class Command(BaseCommand):
fname = gs.settings.get('widget_file_{}'.format(lc))
if not fname or gs.settings.get('widget_checksum_{}'.format(lc), '') != checksum:
newname = default_storage.save(
'widget/widget.{}.{}.js'.format(lc, checksum),
'pub/widget/widget.{}.{}.js'.format(lc, checksum),
ContentFile(data)
)
gs.settings.set('widget_file_{}'.format(lc), 'file://' + newname)