From e5ab06db0b960f73bc86203944377528d645533c Mon Sep 17 00:00:00 2001 From: komalsheth286 Date: Tue, 4 Oct 2016 14:37:08 +0530 Subject: Forgot password API --- website/views.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'website/views.py') diff --git a/website/views.py b/website/views.py index 276f70e..b516fad 100755 --- a/website/views.py +++ b/website/views.py @@ -241,17 +241,15 @@ def view_abstracts(request): count_list =[] if user.is_authenticated(): if user.is_superuser : - proposals = Proposal.objects.all() + proposals = Proposal.objects.all().order_by('status') + ratings = Ratings.objects.all() + context['ratings'] = ratings context['proposals'] = proposals - for proposal in proposals: - count = Comments.objects.filter(proposal = proposal).count() - count_list.append(count) - context['counts'] = count_list context['user'] = user return render(request, 'view-abstracts.html', context) elif user is not None: if Proposal.objects.filter(user = user).exists : - proposals = Proposal.objects.filter(user = user) + proposals = Proposal.objects.filter(user = user).order_by('status') context['counts'] = count_list context['proposals'] = proposals context['user'] = user -- cgit