Esempio n. 1
0
 def __init__(self, *args, **kwargs):
     super(Client, self).__init__(*args, **kwargs)
     
     self.aws_bucket = msettings['AWS_BUCKET']
     self.aws_prefix = msettings.get('AWS_PREFIX', '').strip('/')
     self.aws_bucket_cname =  msettings.get('AWS_BUCKET_CNAME', False)
     
     assert self.aws_bucket
Esempio n. 2
0
    def __init__(self, *args, **kwargs):
        super(Client, self).__init__(*args, **kwargs)
        
        self.aws_bucket = msettings['AWS_BUCKET']
        self.aws_prefix = msettings.get('AWS_PREFIX', '').strip('/')
        self.aws_bucket_cname =  msettings.get('AWS_BUCKET_CNAME', False)
        self.use_cloudfront = msettings.get('USE_CLOUDFRONT', False)
        self.cloudfront_distribution = msettings.get('CLOUDFRONT_DISTRIBUTION', None)

        assert self.aws_bucket
Esempio n. 3
0
    def __init__(self, *args, **kwargs):
        super(Client, self).__init__(*args, **kwargs)

        self.aws_bucket = msettings['AWS_BUCKET']
        self.aws_prefix = msettings.get('AWS_PREFIX', '').strip('/')
        self.aws_bucket_cname = msettings.get('AWS_BUCKET_CNAME', False)
        self.use_cloudfront = msettings.get('USE_CLOUDFRONT', False)
        self.cloudfront_distribution = msettings.get('CLOUDFRONT_DISTRIBUTION',
                                                     None)

        assert self.aws_bucket
Esempio n. 4
0
def sass_receiver(sender, **kwargs):

    sass_cmd = msettings.get("SASS_COMMAND", "sass")

    root = msettings["STATIC_ROOT"]

    for filename in listdir_recursive(root):

        if filename.endswith(".sass") or filename.endswith(".scss"):

            sass_path = os.path.join(root, filename)
            css_path = sass_path[:-4] + "css"

            cmd = "%s %s %s" % (sass_cmd, sass_path, css_path)
            subprocess.call(cmd.split(" "))
Esempio n. 5
0
def sass_receiver(sender, **kwargs):

    sass_cmd = msettings.get("SASS_COMMAND", "sass")

    root = msettings['STATIC_ROOT']

    for filename in listdir_recursive(root):

        if filename.endswith('.sass') or filename.endswith('.scss'):

            sass_path = os.path.join(root, filename)
            css_path = sass_path[:-4] + "css"

            cmd = "%s %s %s" % (sass_cmd, sass_path, css_path)
            subprocess.call(cmd.split(' '))
Esempio n. 6
0
 def supports_gzip(self):
     return msettings.get('AWS_GZIP', True)
 def __init__(self, *args, **kwargs):
     super(Client, self).__init__(*args, **kwargs)
     self.pool = Pool(msettings.get('AWS_ASYNC_WORKERS', 4))
Esempio n. 8
0
 def __init__(self, *args, **kwargs):
     super(Client, self).__init__(*args, **kwargs)
     
     self.cloudfront_domain_name = msettings['CLOUDFRONT_DOMAIN_NAME']
     self.aws_prefix = msettings.get('AWS_PREFIX', '').strip('/')