diff options
author | komalsheth286 | 2016-10-04 14:37:08 +0530 |
---|---|---|
committer | komalsheth286 | 2016-10-04 14:37:08 +0530 |
commit | e5ab06db0b960f73bc86203944377528d645533c (patch) | |
tree | c431686ab0cef9e06e4616739f9e7643d09d7eb8 /website/views.py | |
parent | be87ddf10812c5814fe93a7d6529b15bd4d2608c (diff) | |
download | SciPy2016-e5ab06db0b960f73bc86203944377528d645533c.tar.gz SciPy2016-e5ab06db0b960f73bc86203944377528d645533c.tar.bz2 SciPy2016-e5ab06db0b960f73bc86203944377528d645533c.zip |
Forgot password API
Diffstat (limited to 'website/views.py')
-rwxr-xr-x | website/views.py | 10 |
1 files changed, 4 insertions, 6 deletions
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 |