diff --git a/django/core/cache/__init__.py b/django/core/cache/__init__.py index 680f724f94..334a932a98 100644 --- a/django/core/cache/__init__.py +++ b/django/core/cache/__init__.py @@ -15,7 +15,11 @@ cache class. See docs/cache.txt for information on the public API. """ -from cgi import parse_qsl +try: + from urlparse import parse_qsl +except ImportError: + from cgi import parse_qsl + from django.conf import settings from django.core import signals from django.core.cache.backends.base import InvalidCacheBackendError, CacheKeyWarning