|
|
@@ -17,6 +17,7 @@ from django.contrib.auth.hashers import make_password, check_password
|
|
|
from PIL import Image
|
|
|
from django.utils import timezone
|
|
|
import xmltodict
|
|
|
+from requests.auth import HTTPBasicAuth
|
|
|
from django.contrib.auth import get_user_model
|
|
|
from apps.AppInfo.models import (
|
|
|
Article, CKArticle, Equip, Equip_type, FarmList, FarmUser, GardenManage,
|
|
|
@@ -313,6 +314,8 @@ class Tourist(ListView):
|
|
|
return render(request, 'outerNet/tourist.html', context={})
|
|
|
def post(self,request):
|
|
|
pass
|
|
|
+
|
|
|
+
|
|
|
#旅游导览
|
|
|
class Tourist_List(ListView):
|
|
|
def get(self,request):
|
|
|
@@ -320,6 +323,7 @@ class Tourist_List(ListView):
|
|
|
def post(self,request):
|
|
|
pass
|
|
|
|
|
|
+
|
|
|
# 民宿列表
|
|
|
class Dorm_List(ListView):
|
|
|
def get(self,request):
|
|
|
@@ -3456,4 +3460,19 @@ class Pic_locat(ListView):
|
|
|
return HttpResponse("1")
|
|
|
except Exception as e:
|
|
|
print("--->>",e)
|
|
|
- return HttpResponse("0")
|
|
|
+ return HttpResponse("0")
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+class Home_Farm(ListView):
|
|
|
+ def get(self,request):
|
|
|
+ username = request.user.username
|
|
|
+ print('username:',username)
|
|
|
+ user = MyUser.objects.get(username=username)
|
|
|
+ print("当前用户为:", username)
|
|
|
+ farm_list = FarmList.objects.filter(user=user)
|
|
|
+ return render(request, 'backstageNet/home.html', context={"farm_list":farm_list})
|
|
|
+
|
|
|
+ def post(self, request):
|
|
|
+ pass
|