mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Fixed a minor issues with redis-py insistence on a args as lists.
This commit is contained in:
parent
4e0a352b55
commit
ada157c7df
2 changed files with 4 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ class ConstanceAdmin(admin.ModelAdmin):
|
|||
for name, (default, help_text) in settings.CONFIG.iteritems())
|
||||
# Then update the mapping with actually values from the backend
|
||||
initial = dict(default_initial,
|
||||
**dict(config._backend.mget(settings.CONFIG.iterkeys())))
|
||||
**dict(config._backend.mget(settings.CONFIG.keys())))
|
||||
form = ConstanceForm(initial=initial)
|
||||
if request.method == 'POST':
|
||||
form = ConstanceForm(request.POST)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ class RedisBackend(Backend):
|
|||
return None
|
||||
|
||||
def mget(self, keys):
|
||||
prefixed_keys = (self.add_prefix(key) for key in keys)
|
||||
if not keys:
|
||||
return []
|
||||
prefixed_keys = [self.add_prefix(key) for key in keys]
|
||||
values = (loads(value) for value in self._rd.mget(prefixed_keys))
|
||||
return itertools.izip(keys, values)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue