Esempio n. 1
0
def totals(request):
    totals = []
    if request.user.is_authenticated():
        r = Goal().redis
        pipe = r.pipeline()
        for k in r.keys():
            pipe.get(k)
        totals = [{'date': k, 'count': c} for k in r.keys() for c in pipe.execute()]
    return r2r("totals.jinja",request,{'totals':totals})
Esempio n. 2
0
def totals(request):
    totals = []
    if request.user.is_authenticated():
        r = Goal().redis
        pipe = r.pipeline()
        for k in r.keys():
            pipe.get(k)
        totals = [{'date': k, 'count': c} for k in r.keys() for c in pipe.execute()]
    return r2r("totals.jinja",request,{'totals':totals})