def redis_info(request):
 redis_info = {}
 for key in django_settings.REDIS_BACKENDS.keys():
  redis_info[key] = {}
  client = redis_client(key)
  redis_info[key]['connection'] = django_settings.REDIS_BACKENDS[key]
  try:
   cfg = client.config_get()
   redis_info[key]['config'] = [{'key': k, 'value': cfg[k]} for k in sorted(cfg)]
   info = client.info()
   redis_info[key]['info'] = [{'key': k, 'value': info[k]} for k in sorted(info)]
  except ConnectionError:
   redis_info[key]['down'] = True
 return render_to_response('kadmin/redis.html', {'redis_info': redis_info, 'title': 'Redis Information'}, RequestContext(request, {}))

def redis_info ( request ) : redis_info = { } for key in django_settings . REDIS_BACKENDS . keys ( ) : redis_info [ key ] = { } client = redis_client ( key ) redis_info [ key ] [ 'connection' ] = django_settings . REDIS_BACKENDS [ key ] try : cfg = client . config_get ( ) redis_info [ key ] [ 'config' ] = [ { 'key' : k , 'value' : cfg [ k ] } for k in sorted ( cfg ) ] info = client . info ( ) redis_info [ key ] [ 'info' ] = [ { 'key' : k , 'value' : info [ k ] } for k in sorted ( info ) ] except ConnectionError : redis_info [ key ] [ 'down' ] = True return render_to_response ( 'kadmin/redis.html' , { 'redis_info' : redis_info , 'title' : 'Redis Information' } , RequestContext ( request , { } ) )
admin view that displays redis info+config output for all backends .