def getStanding():
    rackerlist = Racker.objects.all()
    names = []
    w = []
    start = getRangeStart()
    end = getRangeEnd()
    for racker in rackerlist:
        email = racker.email
        print email
        name = racker.name
        print name
        names.append(name)
        workouts = sumPersonalWorkouts(start,end,email)
        print workouts
        w.append(workouts)
        #temp = standing(email,workouts)
        #temp = standing(racker.email, sumPersonalWorkouts(start,end,racker.email)
       # cells.append(temp)
       # cells.append(temp)
    z = zip(w,names)
    sorted(z,reverse=True)
    return z 
def getPercentage():
    rackerlist = Racker.objects.all()
    total_workout = len(Workout.objects.all())
    print total_workout
    names = []
    counter = 0
    percentagelist = []
    start = getRangeStart()
    end = getRangeEnd()
    for racker in rackerlist:
        email = racker.email
        name = racker.name
        names.append(name)
        workouts = sumPersonalWorkouts(start,end,email)
        percentage = 100*float(workouts)/(float(total_workout))
        counter += percentage
        percentagelist.append(percentage)
        #temp = standing(email,workouts)
        #temp = standing(racker.email, sumPersonalWorkouts(start,end,racker.email)
       # cells.append(temp)
       # cells.append(temp)
    z = zip(percentagelist,names)
    sorted(z,reverse=True)
    return z