|
|
@@ -3522,6 +3522,7 @@ class Area_Create(ListView):
|
|
|
name = request.POST.get("name")
|
|
|
area = request.POST.get("area")
|
|
|
location = request.POST.get("location")
|
|
|
+ location_2 = request.POST.get("location_2")
|
|
|
user_obj = MyUser.objects.get(username=uname)
|
|
|
if GardenArea.objects.filter(user=user_obj).exists():
|
|
|
try:
|
|
|
@@ -3529,6 +3530,7 @@ class Area_Create(ListView):
|
|
|
area_obj.name = name
|
|
|
area_obj.area = area
|
|
|
area_obj.location = location
|
|
|
+ area_obj.location_2 = location_2
|
|
|
area_obj.upl_time = datetime.datetime.now()
|
|
|
area_obj.save()
|
|
|
data = "1"
|
|
|
@@ -3537,7 +3539,7 @@ class Area_Create(ListView):
|
|
|
data = "0"
|
|
|
else:
|
|
|
try:
|
|
|
- GardenArea.objects.create(user=user_obj,name=name,area=area,location=location,upl_time=datetime.datetime.now())
|
|
|
+ GardenArea.objects.create(user=user_obj,name=name,area=area,location=location,location_2=location_2,upl_time=datetime.datetime.now())
|
|
|
data = "1"
|
|
|
except Exception as e:
|
|
|
print(e)
|