[extensions-web] ratings: Make sure to sort the comments with newest first



commit bf4f78dfed61ed7ff1561f8993fed82baf5949bb
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 26 00:13:35 2012 -0300

    ratings: Make sure to sort the comments with newest first

 sweettooth/ratings/views.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/ratings/views.py b/sweettooth/ratings/views.py
index 75eba12..263ea15 100644
--- a/sweettooth/ratings/views.py
+++ b/sweettooth/ratings/views.py
@@ -37,6 +37,8 @@ def get_comments(request):
     show_all = json.loads(request.GET.get('all', 'false'))
 
     comment_list = comments.get_model().objects.for_model(extension)
+    comment_list = comment_list.order_by('-submit_date')
+
     if not show_all:
         comment_list = comment_list[:5]
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]