|
@@ -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, Sightsee_Info
|
|
|
|
|
|
|
+ Product, Pick_Pub, FarmList, Hotel_Info, GardenArea, Sightsee_Info,Hotel_Info
|
|
|
|
|
|
|
|
|
|
|
|
|
from django.utils.decorators import method_decorator
|
|
from django.utils.decorators import method_decorator
|
|
@@ -151,6 +151,7 @@ class Home(View):
|
|
|
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]
|
|
sightsee = Sightsee_Info.objects.all()[0:6]
|
|
|
|
|
+ hotel2 = Hotel_Info.objects.all().order_by('-upl_time')
|
|
|
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):
|
|
|
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,"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,"hotel2":hotel2,
|
|
|
"product": product, "pick": pick, "farm": farm, "curr_user": curr_user,"sightsee":sightsee})
|
|
"product": product, "pick": pick, "farm": farm, "curr_user": curr_user,"sightsee":sightsee})
|
|
|
|
|
|
|
|
def post(self, request):
|
|
def post(self, request):
|