Jelajahi Sumber

旅游编辑接口

yf_ymm 5 tahun lalu
induk
melakukan
9bda749061
1 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 6 6
      apps/Equipment/views.py

+ 6 - 6
apps/Equipment/views.py

@@ -1456,22 +1456,22 @@ class My_Pub_List(ListView):
         if _type:
             _list = _list.filter(art_type=_type)
             if _type == "5":
-                nums = CKArticle.objects.filter(art_type="5")
+                nums = CKArticle.objects.filter(art_type="5").count()
                 pub_list = CKArticle.objects.filter(art_type="5")[(10*(page-1)):(page*10)]
             elif _type == "6":
-                nums = Video_data.objects.all()
+                nums = Video_data.objects.all().count()
                 pub_list = Video_data.objects.all()[(10*(page-1)):(page*10)]
             elif _type == "7":
-                nums = Product.objects.all()
+                nums = Product.objects.all().count()
                 pub_list = Product.objects.all()[(10*(page-1)):(page*10)]
             elif _type == "8":
-                nums = Pick_Pub.objects.all()
+                nums = Pick_Pub.objects.all().count()
                 pub_list = Pick_Pub.objects.all()[(10*(page-1)):(page*10)]
             elif _type == "9":
-                nums = Hotel_Info.objects.all()
+                nums = Hotel_Info.objects.all().count()
                 pub_list = Hotel_Info.objects.all()[(10*(page-1)):(page*10)]
             elif _type == "10":
-                nums = Sightsee_Info.objects.all()
+                nums = Sightsee_Info.objects.all().count()
                 pub_list = Sightsee_Info.objects.all()[(10*(page-1)):(page*10)]
         if hidden:
             _list = _list.filter(hidden=hidden)