|
@@ -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, GardenArea
|
|
|
|
|
|
|
+ Product, Pick_Pub, FarmList, Hotel_Info, GardenArea, Sightsee_Info
|
|
|
|
|
|
|
|
|
|
|
|
|
from django.utils.decorators import method_decorator
|
|
from django.utils.decorators import method_decorator
|
|
@@ -150,6 +150,7 @@ class Home(View):
|
|
|
garden = GardenArea.objects.all()
|
|
garden = GardenArea.objects.all()
|
|
|
hotel = Hotel_Info.objects.all()[0:5]
|
|
hotel = Hotel_Info.objects.all()[0:5]
|
|
|
article = CKArticle.objects.all()[0:12]
|
|
article = CKArticle.objects.all()[0:12]
|
|
|
|
|
+ sightsee = Sightsee_Info.objects.all()[0:6]
|
|
|
if request.user.is_authenticated():
|
|
if request.user.is_authenticated():
|
|
|
user_name = request.user.username
|
|
user_name = request.user.username
|
|
|
curr_user = MyUser.objects.get(username=user_name)
|
|
curr_user = MyUser.objects.get(username=user_name)
|
|
@@ -159,7 +160,7 @@ class Home(View):
|
|
|
curr_user = ""
|
|
curr_user = ""
|
|
|
return render(request, 'outerNet/index2.html', context={"user_news": user_news,"zero_news": zero_news, "one_news": one_news,"article":article,
|
|
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,
|
|
|
- "product": product, "pick": pick, "farm": farm, "curr_user": curr_user})
|
|
|
|
|
|
|
+ "product": product, "pick": pick, "farm": farm, "curr_user": curr_user,"sightsee":sightsee})
|
|
|
|
|
|
|
|
def post(self, request):
|
|
def post(self, request):
|
|
|
pass
|
|
pass
|