Project model changes.
--- a/app/projrev/models.py Fri Aug 07 03:40:08 2009 +0530
+++ b/app/projrev/models.py Fri Aug 07 03:56:08 2009 +0530
@@ -67,6 +67,8 @@
choices=[('new', 'New'), ('pilot', 'Pilot'),
('invalid', 'Invalid')])
+ last_updated_on = models.DateTimeField(auto_now=True)
+
@classmethod
def getLineItem(cls, code):
"""Get the State name from its code.
--- a/app/projrev/views/proposal.py Fri Aug 07 03:40:08 2009 +0530
+++ b/app/projrev/views/proposal.py Fri Aug 07 03:56:08 2009 +0530
@@ -240,7 +240,8 @@
if not micr_code:
template = 'projrev/proposal/list.html'
- context['projects'] = Project.objects.all().exclude(status__exact='invalid')
+ context['projects'] = Project.objects.all().exclude(
+ status__exact='invalid').order_by('-last_updated_on')
context['row_url'] = '/proposal/review/'
return render_to_response(template, RequestContext(request, context))
@@ -278,26 +279,12 @@
"""
"""
- if request.method == 'POST':
- return rankPost(request, micr_code)
- else:
- return rankGet(request, micr_code)
-
-def rankPost(request, micr_code=None):
- """
- """
-
- return rankGet(request, micr_code)
-
-def rankGet(request, micr_code=None):
- """
- """
-
context = {}
if not micr_code:
template = 'projrev/proposal/list.html'
- context['projects'] = Project.objects.all()
+ context['projects'] = Project.objects.all().exclude(
+ status__exact='invalid').order_by('-last_updated_on')
context['row_url'] = '/proposal/rank/'
return render_to_response(template, RequestContext(request, context))
--- a/app/templates/projrev/proposal/rank.html Fri Aug 07 03:40:08 2009 +0530
+++ b/app/templates/projrev/proposal/rank.html Fri Aug 07 03:56:08 2009 +0530
@@ -128,7 +128,7 @@
Overall Score:
</div>
<div class='review-right'>
- {{ total_score }}
+ {{ total_score }}
{{ total_avg }}
</div>
</p>