[Branch,~linaro-validation/lava-dashboard/trunk] Rev 288: Fix sorting on bundle_list

Message ID 20111215161516.10648.49574.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Paul Larson Dec. 15, 2011, 4:15 p.m.
------------------------------------------------------------
revno: 288
committer: Paul Larson <paul.larson@canonical.com>
branch nick: lava-dashboard
timestamp: Thu 2011-12-15 10:13:43 -0600
message:
  Fix sorting on bundle_list
modified:
  dashboard_app/templates/dashboard_app/bundle_list.html
  dashboard_app/views.py


--
lp:lava-dashboard
https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk

You are subscribed to branch lp:lava-dashboard.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk/+edit-subscription

Patch

=== modified file 'dashboard_app/templates/dashboard_app/bundle_list.html'
--- dashboard_app/templates/dashboard_app/bundle_list.html	2011-11-15 19:03:46 +0000
+++ dashboard_app/templates/dashboard_app/bundle_list.html	2011-12-15 16:13:43 +0000
@@ -35,7 +35,7 @@ 
     oTable = $('#bundles').dataTable({
       bJQueryUI: true,
       sPaginationType: "full_numbers",
-      aaSorting: [[1, "desc"]],
+      aaSorting: [[4, "desc"]],
       iDisplayLength: 25,
       aLengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
       sDom: 'lfr<"#master-toolbar">t<"F"ip>'

=== modified file 'dashboard_app/views.py'
--- dashboard_app/views.py	2011-11-09 00:02:25 +0000
+++ dashboard_app/views.py	2011-12-15 16:13:43 +0000
@@ -136,7 +136,8 @@ 
     )
     return object_list(
         request,
-        queryset=bundle_stream.bundles.select_related('bundle_stream', 'deserialization_error').order_by('-uploaded_on'),
+        queryset=bundle_stream.bundles.select_related(
+            'bundle_stream', 'deserialization_error'),
         template_name="dashboard_app/bundle_list.html",
         template_object_name="bundle",
         extra_context={