|
|
@@ -3424,6 +3424,10 @@ class Pic_locat(ListView):
|
|
|
pass
|
|
|
|
|
|
def post(self,request):
|
|
|
+ username = request.user.username
|
|
|
+ print('username:',username)
|
|
|
+ user = MyUser.objects.get(username=username)
|
|
|
+ print("当前用户为:", username)
|
|
|
# 东北点
|
|
|
locat1 = request.POST.get('locat1')
|
|
|
# 西南点
|
|
|
@@ -3431,8 +3435,9 @@ class Pic_locat(ListView):
|
|
|
# 图片地址
|
|
|
addr = request.POST.get('addr')
|
|
|
locat_info = request.POST.get('locat_info')
|
|
|
+ pic_center = request.POST.get('pic_center')
|
|
|
try:
|
|
|
- Pic_Info.object.create(locat1=locat1,locat2=locat2,addr=addr,locat_info=locat_info)
|
|
|
+ Pic_Info.object.create(pic_user=user,locat1=locat1,locat2=locat2,pic_center=pic_center,addr=addr,locat_info=locat_info)
|
|
|
return HttpResponse("1")
|
|
|
except Exception as e:
|
|
|
print("--->>",e)
|