Kaynağa Gözat

调整数据表

yf_ymm 5 yıl önce
ebeveyn
işleme
e62863e608
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      apps/Home/views.py

+ 3 - 2
apps/Home/views.py

@@ -25,7 +25,7 @@ from django.core.cache import cache
 import os
 
 from apps.AppInfo.models import Equip, Equip_type, MyUser, QXZdata, QXZstatus, QXZdata_New, JKdata, Article, QXZstatus_New, QXZswitchdata, QXZswitchstatus, CKArticle, GardenManage, Video_data,\
-    Product, Pick_Pub, FarmList, Hotel_Info, GardenArea, Sightsee_Info
+    Product, Pick_Pub, FarmList, Hotel_Info, GardenArea, Sightsee_Info,Hotel_Info
 
 
 from django.utils.decorators import method_decorator
@@ -151,6 +151,7 @@ class Home(View):
         hotel = Hotel_Info.objects.all()[0:5]
         article = CKArticle.objects.all()[0:12]
         sightsee = Sightsee_Info.objects.all()[0:6]
+        hotel2 = Hotel_Info.objects.all().order_by('-upl_time')
         if request.user.is_authenticated():
             user_name = request.user.username
             curr_user = MyUser.objects.get(username=user_name)
@@ -159,7 +160,7 @@ class Home(View):
         else:
             curr_user = ""
         return render(request, 'outerNet/index2.html', context={"user_news": user_news,"zero_news": zero_news, "one_news": one_news,"article":article,
-                                                               "two_news": two_news, "video_news": video_news,"hotel":hotel,"garden":garden,
+                                                               "two_news": two_news, "video_news": video_news,"hotel":hotel,"garden":garden,"hotel2":hotel2,
                                                                "product": product, "pick": pick, "farm": farm, "curr_user": curr_user,"sightsee":sightsee})
 
     def post(self, request):