images on comment page
This commit is contained in:
@@ -3692,13 +3692,27 @@ def workout_comment_view(request,id=0):
|
|||||||
'id':id})
|
'id':id})
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
form = WorkoutCommentForm()
|
form = WorkoutCommentForm()
|
||||||
|
|
||||||
return render(request,
|
g = GraphImage.objects.filter(workout=row).order_by("-creationdatetime")
|
||||||
'workout_comments.html',
|
|
||||||
{'workout':w,
|
if (len(g)<=3):
|
||||||
'comments':comments,
|
return render(request,
|
||||||
'form':form,
|
'workout_comments.html',
|
||||||
|
{'workout':w,
|
||||||
|
'graphs1':g[0:3],
|
||||||
|
'comments':comments,
|
||||||
|
'form':form,
|
||||||
|
})
|
||||||
|
else:
|
||||||
|
return render(request,
|
||||||
|
'workout_comments.html',
|
||||||
|
{'workout':w,
|
||||||
|
'graphs1':g[0:3],
|
||||||
|
'graphs1':g[3:6],
|
||||||
|
'comments':comments,
|
||||||
|
'form':form,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
# The basic edit page
|
# The basic edit page
|
||||||
|
|||||||
Reference in New Issue
Block a user