Skip to content

Commit

Permalink
Make sure the cache backend setting is correctly handled on >= 1.3. R…
Browse files Browse the repository at this point in the history
…efs issue encode#2.
  • Loading branch information
jezdez committed Feb 15, 2011
1 parent a3dbfd4 commit fa08781
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compressor/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os

from django import VERSION as DJANGO_VERSION
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured

Expand Down Expand Up @@ -105,7 +106,7 @@ 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):
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
Expand Down

0 comments on commit fa08781

Please sign in to comment.