예제 #1
0
def index(request):
    repRange = range(1, 6)
    context = {
        "prs": get_prs(request=request, reps=repRange),
        "reps": repRange,
        "workouts": Workout.objects.order_by("-date"),
    }
    return render(request, "index.html", context)
예제 #2
0
def index(request):
	repRange = range(1,6)
	context = {
		'prs' : get_prs(request=request, reps=repRange),
		'reps' : repRange,
		'workouts' : Workout.objects.order_by('-date')
	}
	return render(request, 'index.html', context)
예제 #3
0
def index(request):
	repRange = range(1,6)
	logged_in_user = request.user
	context = {
		'prs' : get_prs(request=request, reps=repRange),
		'reps' : repRange,
		'workouts' : Workout.objects.order_by('-date').filter(user=logged_in_user)
	}
	return render(request, 'index.html', context)
예제 #4
0
def index(request):
    repRange = range(1, 6)
    logged_in_user = request.user
    context = {
        'prs': get_prs(request=request, reps=repRange),
        'reps': repRange,
        'workouts':
        Workout.objects.order_by('-date').filter(user=logged_in_user)
    }
    return render(request, 'index.html', context)