Explorar el Código

测报灯图片收集

yf_ymm hace 5 años
padre
commit
88bf313c68
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      apps/Equipment/views.py

+ 2 - 0
apps/Equipment/views.py

@@ -2073,6 +2073,8 @@ class CKArticle_View(ListView):
         title = request.POST.get('title')
         art_type = request.POST.get('art_type')
         content = request.POST.get('content')
+        if CKArticle.objects.filter(title=title).exists():
+            return HttpResponse("2")
         try:
             # CKArticle.objects.create(auther=current_user.username,art_type=art_type,writer=writer,intro=intro,title=title,content=content,head_img=news_photo)
             if art_type == "5":