|
@@ -25,7 +25,7 @@ from django.core.cache import cache
|
|
|
import os
|
|
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,\
|
|
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
|
|
from django.utils.decorators import method_decorator
|
|
@@ -130,6 +130,7 @@ class Home(View):
|
|
|
product = Product.objects.all()[0:8]
|
|
product = Product.objects.all()[0:8]
|
|
|
pick = Pick_Pub.objects.all()[0:6]
|
|
pick = Pick_Pub.objects.all()[0:6]
|
|
|
farm = FarmList.objects.all()
|
|
farm = FarmList.objects.all()
|
|
|
|
|
+ garden = GardenArea.objects.all()
|
|
|
hotel = Hotel_Info.objects.all()[0:5]
|
|
hotel = Hotel_Info.objects.all()[0:5]
|
|
|
if request.user.is_authenticated():
|
|
if request.user.is_authenticated():
|
|
|
user_name = request.user.username
|
|
user_name = request.user.username
|
|
@@ -139,7 +140,7 @@ class Home(View):
|
|
|
else:
|
|
else:
|
|
|
curr_user = ""
|
|
curr_user = ""
|
|
|
return render(request, 'outerNet/index2.html', context={"user_news": user_news,"zero_news": zero_news, "one_news": one_news,
|
|
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})
|
|
"product": product, "pick": pick, "farm": farm, "curr_user": curr_user})
|
|
|
|
|
|
|
|
def post(self, request):
|
|
def post(self, request):
|