Пример #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)