def get_scale_range(self, scale, mv): """Returns a range of values for a scale, within some space of statistical values""" # okay, it's not very configurable, but I tried if scale == 'year': set_key = '%s:years' % mv.metrica.key_prefix() return redis.smembers(set_key) return xrange(*DATE_SCALES_RANGES[scale](**mv._timespan))
def get_choices(self, key, **kwargs): return map(self.value_from_string, self.choices or redis.smembers(key))
def get_choices(self, key): return redis.smembers(key)