parameters: (request)
docstring: 删除bug
      :param request:
      :return:
docstring_summary: 删除bug
      :param request:
      :return:
docstring_tokens: 删除bug : param request : : return :
function: def delbug(request):
      '''
      删除bug
      :param request:
      :return:
      '''
      if not request.user.is_authenticated: #这个在新版本中是不带()
          return HttpResponse("0")
      if request.method == "POST":
          bug_id = int(request.POST['bug_id'])
          if bug_id == "":
              return HttpResponse("bug_id is null")
          else:
              try:
                  bug = buglist.objects.get(id=bug_id)
                  if bug.is_del == 1:
                      return HttpResponse("bug is delect")
                  else:
                      bug.is_del = 1
                      bug.save()
                      return HttpResponse("1")
              except ObjectDoesNotExist as e:
                  return HttpResponse("3")
  
      else:
          return HttpResponse("2")
function_tokens: def delbug ( request ) : if not request . user . is_authenticated : #这个在新版本中是不带() return HttpResponse ( "0" ) if request . method == "POST" : bug_id = int ( request . POST [ 'bug_id' ] ) if bug_id == "" : return HttpResponse ( "bug_id is null" ) else : try : bug = buglist . objects . get ( id = bug_id ) if bug . is_del == 1 : return HttpResponse ( "bug is delect" ) else : bug . is_del = 1 bug . save ( ) return HttpResponse ( "1" ) except ObjectDoesNotExist as e : return HttpResponse ( "3" ) else : return HttpResponse ( "2" )