From e1b5056346b2da2048d773344f3c84454a19c0d9 Mon Sep 17 00:00:00 2001 From: xianfuxing Date: Wed, 1 Aug 2018 16:51:06 +0800 Subject: [PATCH] # up order by time in count page --- apps/counter/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/counter/api/views.py b/apps/counter/api/views.py index e2de5b7..6df0666 100644 --- a/apps/counter/api/views.py +++ b/apps/counter/api/views.py @@ -17,7 +17,7 @@ class DeviceCountListAPIView(ListAPIView): filter_backends = [SearchFilter, OrderingFilter] pagination_class = PostPageNumberPagination search_fields = ['device_id'] - queryset = DeviceCount.objects.all() + queryset = DeviceCount.objects.all().order_by('-data_time') class DeviceInfoListAPIView(ListAPIView):