File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 19
19
if COMPRESS_JS_FILTERS is None :
20
20
COMPRESS_JS_FILTERS = []
21
21
22
- COMPRESS_DATA_URI_MIN_SIZE = getattr (settings , 'COMPRESS_DATA_URI_MIN_SIZE' , 1024 )
22
+ DATA_URI_MIN_SIZE = getattr (settings , 'COMPRESS_DATA_URI_MIN_SIZE' , 1024 )
23
23
24
24
# rebuilds the cache every 30 days if nothing has changed.
25
25
REBUILD_TIMEOUT = getattr (settings , 'COMPRESS_REBUILD_TIMEOUT' , 2592000 ) # 30 days
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def data_uri_converter(self, matchobj):
31
31
url = matchobj .group (1 ).strip (' \' "' )
32
32
if not url .startswith ('data:' ):
33
33
path = self .get_file_path (url )
34
- if os .stat (path ).st_size <= settings .COMPRESS_DATA_URI_MIN_SIZE :
34
+ if os .stat (path ).st_size <= settings .DATA_URI_MIN_SIZE :
35
35
data = b64encode (open (path , 'rb' ).read ())
36
36
return 'url(http://github.com/"data:%s;base64,%s")' % (mimetypes .guess_type (path )[0 ], data )
37
37
return 'url(http://github.com/"%s")' % url
You can’t perform that action at this time.
0 commit comments