Sfoglia il codice sorgente

首页农场信息

yf_ymm 5 anni fa
parent
commit
c657d27bb5
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  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
+    Product, Pick_Pub, FarmList, Hotel_Info, GardenArea
 
 
 from django.utils.decorators import method_decorator
@@ -130,6 +130,7 @@ class Home(View):
         product = Product.objects.all()[0:8]
         pick = Pick_Pub.objects.all()[0:6]
         farm = FarmList.objects.all()
+        garden = GardenArea.objects.all()
         hotel = Hotel_Info.objects.all()[0:5]
         if request.user.is_authenticated():
             user_name = request.user.username
@@ -139,7 +140,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,
-                                                               "two_news": two_news, "video_news": video_news,"hotel":hotel,
+                                                               "two_news": two_news, "video_news": video_news,"hotel":hotel,"garden":garden,
                                                                "product": product, "pick": pick, "farm": farm, "curr_user": curr_user})
 
     def post(self, request):