Pārlūkot izejas kodu

测报灯图片收集

yf_ymm 5 gadi atpakaļ
vecāks
revīzija
adc1eaf87a
2 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. 1 1
      apps/AppInfo/models.py
  2. 4 3
      apps/Equipment/views.py

+ 1 - 1
apps/AppInfo/models.py

@@ -522,7 +522,7 @@ class Blog(models.Model):
 
 class CKArticle(models.Model):
     author = models.ForeignKey(MyUser,verbose_name=u'作者',blank=True, null=True)
-    art_type = models.CharField(u'文章类型',max_length=10, blank=True, null=True)  # 5 新闻资讯  6 视频资讯  7 产品展厅  8 四季采摘  9  民宿导览  10  旅游景点
+    art_type = models.CharField(u'文章类型',max_length=10, blank=True, null=True)  # 5 新闻资讯  6 视频资讯  7 产品展厅  8 四季采摘  9  民宿导览  10  旅游景点 11 个人农场
     writer = models.CharField(u'发布人', max_length=10, blank=True, null=True)
     title = models.CharField(u'标题',max_length=254, null=True, blank=True)
     video_url = models.FileField(upload_to="media/uploads/", null=True, blank=True, verbose_name="视频内容")

+ 4 - 3
apps/Equipment/views.py

@@ -2776,7 +2776,7 @@ class CropCount_View(ListView):
                     time_now = int(timezone.now().strftime("%Y%m%d"))
                     data = time_now-time
                     print(data)
-                    curro = "" 
+                    curro = ""
                     h2 = {"cropname":x.cropname,
                         "area":x.area.name,
                         "crop_count":x.crop_count,
@@ -2785,7 +2785,7 @@ class CropCount_View(ListView):
                         "id":x.id,
                         "upl_time":x.upl_time.strftime('%Y-%m-%d'),
                         "crop_img":x.crop_img,
-                        } 
+                        }
                     dat.append({"data":h2,"curro":curro})
         nums = len(dat)
         dat = dat[(9*(page-1)):(page*9)]
@@ -3503,6 +3503,7 @@ class Area_Create(ListView):
         currpage = request.GET.get('currpage')
         uname = request.GET.get("uname")
         f_name = request.GET.get("f_name")
+        c_id = request.GET.get("id")
         user_obj = MyUser.objects.get(username=uname)
         try:
             curr_area = GardenArea.objects.get(user=user_obj)
@@ -3511,7 +3512,7 @@ class Area_Create(ListView):
             print(e)
             curr_area = ""
             # user_area = {"name":"","location":""}
-        return render(request, 'backstageNet/systemSet/onlineSplit.html', context={"currpage":currpage,"uname":uname,"f_name":f_name,"curr_area":curr_area})
+        return render(request, 'backstageNet/systemSet/onlineSplit.html', context={"currpage":currpage,"uname":uname,"f_name":f_name,"curr_area":curr_area,"id":c_id})
     def post(self,request):
         uname = request.POST.get("uname")
         name = request.POST.get("name")