Commit c3a7984b by Timothée Peignier

make packager play nicely with exotic or not so exotic storage

parent 6b6644e9
import os
import urlparse
from django.core.files.base import ContentFile
from pipeline.conf import settings
from pipeline.compilers import Compiler
from pipeline.compressors import Compressor
......@@ -79,9 +81,7 @@ class Packager(object):
return self.compressor.compile_templates(package['templates'])
def save_file(self, path, content):
file = storage.open(path, 'wb')
file.write(content)
file.close()
storage.save(path, ContentFile(content))
return path
def create_packages(self, config):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment