mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
fix basestring in python 3
This commit is contained in:
parent
dc89ec294f
commit
498d9f7b3e
1 changed files with 2 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import six
|
||||
from six.moves import zip
|
||||
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
|
@ -25,7 +26,7 @@ class RedisBackend(Backend):
|
|||
except ImportError:
|
||||
raise ImproperlyConfigured(
|
||||
"The Redis backend requires redis-py to be installed.")
|
||||
if isinstance(settings.REDIS_CONNECTION, basestring):
|
||||
if isinstance(settings.REDIS_CONNECTION, six.string_types):
|
||||
self._rd = redis.from_url(settings.REDIS_CONNECTION)
|
||||
else:
|
||||
self._rd = redis.Redis(**settings.REDIS_CONNECTION)
|
||||
|
|
|
|||
Loading…
Reference in a new issue