diff options
author | ankitjavalkar | 2015-03-30 16:09:09 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-03-31 15:28:17 +0530 |
commit | 106f423eada52c2d5760545b7518ddac5218a3ba (patch) | |
tree | 96ebae18c5317ad12fe4f291362303a5326a893e /tbc | |
parent | cfc7fb97bd6ef14c1b5f408d82223227f4f685be (diff) | |
download | Python-TBC-Interface-106f423eada52c2d5760545b7518ddac5218a3ba.tar.gz Python-TBC-Interface-106f423eada52c2d5760545b7518ddac5218a3ba.tar.bz2 Python-TBC-Interface-106f423eada52c2d5760545b7518ddac5218a3ba.zip |
Order pending proposal review list as per ID, fix pending counter
Diffstat (limited to 'tbc')
-rwxr-xr-x | tbc/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tbc/views.py b/tbc/views.py index d626944..bf272ea 100755 --- a/tbc/views.py +++ b/tbc/views.py @@ -137,7 +137,7 @@ def Home(request): curr_user = request.user user_profile = Profile.objects.filter(user=curr_user) - pending_proposal_list = list(Proposal.objects.filter(status="pending")) + pending_proposal_list = list(Proposal.objects.filter(status="pending").order_by('id')) try: pending_user_proposal = Proposal.objects.get(user=user_profile, status="pending") except: @@ -640,7 +640,7 @@ def ReviewProposals(request, proposal_id=None, textbook_id=None): email_send(proposal.user.user.email, subject, message) return HttpResponseRedirect("/proposal-review") else: - new_proposals = Proposal.objects.filter(status="pending") + new_proposals = Proposal.objects.filter(status="pending").order_by('id') old_proposals = [] old_proposal_status = ['samples', 'sample disapproved', 'sample resubmitted', 'sample submitted'] proposals = Proposal.objects.filter(status__in=old_proposal_status) |