Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release/0.6b4'

  • Loading branch information...
commit 574c7cd061259dbbd8389229c472dfd43d5a9973 2 parents 1344336 + b9d6d8f
@jezdez jezdez authored
View
2  compressor/__init__.py
@@ -1,4 +1,4 @@
-VERSION = (0, 6, 0, "b", 3) # following PEP 386
+VERSION = (0, 6, 0, "b", 4) # following PEP 386
DEV_N = None
View
12 compressor/settings.py
@@ -91,10 +91,14 @@ def configure_url(self, value):
def configure_cache_backend(self, value):
if value is None:
# If we are on Django 1.3 AND using the new CACHES setting...
- if getattr(settings, "CACHES", None) and DJANGO_VERSION[:2] >= (1, 3):
- return "default"
- # fallback for people still using the old CACHE_BACKEND setting
- return settings.CACHE_BACKEND
+ if DJANGO_VERSION[:2] >= (1, 3) and hasattr(settings, "CACHES"):
+ value = "default"
+ else:
+ # falling back to the old CACHE_BACKEND setting
+ value = getattr(settings, "CACHE_BACKEND", None)
+ if not value:
+ raise ImproperlyConfigured(
+ "Please specify a cache backend in your settings.")
return value
def configure_offline_context(self, value):
View
8 compressor/storage.py
@@ -21,6 +21,14 @@ def __init__(self, location=None, base_url=None, *args, **kwargs):
super(CompressorFileStorage, self).__init__(location, base_url,
*args, **kwargs)
+ def get_available_name(self, name):
+ """
+ Deletes the given file if it exists.
+ """
+ if self.exists(name):
+ self.delete(name)
+ return name
+
class GzipCompressorFileStorage(CompressorFileStorage):
"""
The standard compressor file system storage that gzips storage files
View
2  docs/conf.py
@@ -50,7 +50,7 @@
# The short X.Y version.
version = '0.6'
# The full version, including alpha/beta/rc tags.
-release = '0.6b3'
+release = '0.6b4'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Please sign in to comment.
Something went wrong with that request. Please try again.